The authoring environment changes to the locale you selected on refreshing the browser. Authoring environment contains the content that is not displayed to the end users.

Localizing for the runtime mode

Localization for the runtime mode allows end users to view the adaptive form in another locale when they are viewing or filling the form.

To enable this, you first generate a dictionary for the adaptive form. This dictionary includes an XLIFF file for the localized text in each of the available locales. Each XLIFF file contains:

text that will be displayed to the end users, and

placeholders for the corresponding localized text

To enable localization, you export the XLIFF files, replace the placeholder text with the localized text, and then import the edited file. The users can then view the localized content in their browsers when they are viewing or filling out the adaptive form. To view the localized content, the end users need to change the browser locale to the relevant locale (an updated XLIFF file with the localized text must be available for the end user to view the localized content).

Perform the following steps to enable localization for the runtime mode:

Iin the AEM Forms UI, select the form and then click the Dictionary icon. AEM Forms generates a dictionary that contains XLIFF files for each locale.

A. Create Dictionary

Launch the AEM Tanslator screen: http://[hostname]:[port]/libs/cq/i18n/translator.html
and then select the dictionary that you generated in the previous step.

Export the XLIFF file for any of the available locales. This opens the file in a new screen.

In our example, we have used the XLIFF file for the Japanese locale. Replace the placeholder content for the Japanese locale with the localized content, and then save the file. A sample update is shown here.

From the AEM Tanslator page, import the XLIFF file that you modified in the previous step. Select the Overwrite checkbox before importing the file.

To confirm that the localization was successful, change your browser locale to the locale of the XLIFF file that your imported, and then open the adaptive form. The content of the adaptive form is displayed in the selected locale.