Localizable Strings
Localizable strings let a form store translations inline in the JSON schema. Use them for respondent-facing text while keeping stored question names and choice values stable.
String Shape
Section titled “String Shape”Most localizable properties accept either a plain string or an object keyed by locale code.
{ "title": { "default": "Event registration", "es": "Registro del evento", "fr": "Inscription a l'evenement" }}Use default for the fallback language. Set root locale when the survey should start in a specific locale.
{ "locale": "es", "title": { "default": "Event registration", "es": "Registro del evento" }}Common Localizable Properties
Section titled “Common Localizable Properties”Localizable properties include:
- Root
title,description,completedHtml,completeText,pageNextText,pagePrevText,startSurveyText, andpreviewText - Page, panel, and question
titleanddescription - Text
placeholder, choicetext,otherText,noneText, and similar labels - Validator
text, required error text, min/max error text, and duplication errors - HTML content in
htmlquestions andcompletedHtmlOnCondition[].html - Dynamic panel
templateTitle,templateTabTitle, andtabTitlePlaceholder
Example
Section titled “Example”{ "locale": "en", "title": { "default": "Service request", "es": "Solicitud de servicio" }, "pageNextText": { "default": "Continue", "es": "Continuar" }, "completeText": { "default": "Submit request", "es": "Enviar solicitud" }, "pages": [ { "name": "contact", "title": { "default": "Contact details", "es": "Datos de contacto" }, "elements": [ { "type": "text", "name": "email", "title": { "default": "Email address", "es": "Correo electronico" }, "placeholder": { "default": "name@example.com", "es": "nombre@ejemplo.com" }, "inputType": "email", "isRequired": true }, { "type": "dropdown", "name": "priority", "title": { "default": "Priority", "es": "Prioridad" }, "choices": [ { "value": "low", "text": { "default": "Low", "es": "Baja" } }, { "value": "high", "text": { "default": "High", "es": "Alta" } } ] } ] } ], "completedHtml": { "default": "<h3>Thanks, {email}.</h3>", "es": "<h3>Gracias, {email}.</h3>" }}Generation Notes
Section titled “Generation Notes”- Translate visible strings, not stored identifiers. Keep
nameand choicevaluestable across locales. - Use language codes consistently, for example
es,fr, orde. - Dynamic text placeholders such as
{email}can appear inside each localized string. - Do not translate expression property names or operators. Translate only the strings displayed to respondents.
- For larger translation workflows, SurveyJS can export and merge locale-only JSON, but generated Formspace schemas can usually include inline localizable objects directly.