Localize Web Forms

If you have added a language to localize an application’s content, you can supply localized strings for control labels and control fields that take constants for input (default value, hint text, and so on) in the forms editor.

When the application is published, users can view the localized version of the form in runtime by choosing their preferred language.

To add a new language to an application, see Localize Applications. When you have added a language in addition to the default (English) language, the Translate (Translate icon) button appears in the forms editor. Click this button to supply localized strings for controls present within the form.

Let’s consider a simple example to understand this feature in detail.

  1. Create a web form with a couple of controls as shown in the following figure:
    Description of translate-form-example.png follows
    Description of the illustration translate-form-example.png

  2. Click Translate (Translate icon) to provide localized strings corresponding to these controls.

  3. In the Translate form window, select a language for which you want supply localized strings from the Languages drop-down field.

    All languages added to the application are present in the Languages drop-down field.

  4. Specify the strings for each control in the form and click OK. The following image shows strings provided for the Spanish language:

    Note:

    In addition to control fields, you can also provide localized strings for constant values that you specify through events or as computed values.

    Description of translate-form-strings.png follows
    Description of the illustration translate-form-strings.png
  5. If a language has a sub-locale corresponding to a country, for example, Spanish (Argentina), you can specify strings that differ for this sub-locale. The remaining strings are picked up from the parent language. The following figure shows example strings specified for a sub-locale:
    Description of translate-sublocale-strings.png follows
    Description of the illustration translate-sublocale-strings.png

    Note:

    • If you have added a new language to the application but not specified localized strings for it in the forms editor, the default strings (in English) for each control are displayed when a user selects this language in runtime.

    • If you have added a new language with a sub-locale to the application but not specified localized strings for it in the forms editor, the parent language strings (if specified) or default strings for each control are displayed when a user selects this sub-locale in runtime.

  6. In the forms editor, you can also specify strings for languages that have unique scripts, such as, Chinese, Arabic, or Hindi.
    Description of translate-unique-scripts.png follows
    Description of the illustration translate-unique-scripts.png

  7. If you add a new control to the forms editor, the Translate form window is automatically updated to show this control’s label. However, other fields that take constants for input are displayed only if you have entered a value in these fields.

  8. If you delete a control from the forms editor, the localized strings that were specified for the control show up as grayed out rows in the Translate form window. To completely remove a string of a deleted control, click the corresponding Delete button or click Clean to clean up the entire window.
    Description of translate-form-clean.png follows
    Description of the illustration translate-form-clean.png

  9. Click Preview to see how the form is displayed for different language selections.
    Description of translate-form-preview.png follows
    Description of the illustration translate-form-preview.png

  10. Click Save to save your changes to the form.