Internationalizing Components internationalizing-components
Internationalize your components and dialogs so that their UI strings can be presented in different languages. Components that are designed for internationalization enable UI strings to be externalized, translated, then imported to the repository. At runtime, the user’s language preferences or the page locale determines which language is displayed in the UI.
Use the following process to internationalize your components and provide the UI in different languages:
- Implement your components using code that internationalizes strings. Your code identifies the strings to translate, and selects the language to present at runtime.
- Create dictionaries and add the English strings to translate.
- Export the dictionary to XLIFF format, translate the strings, then import the XLIFF files back into AEM.
- Incorporate the dictionary into the release management process of your application.
Language Dictionaries language-dictionaries
The AEM internationalization framework uses dictionaries in the repository to store English strings and their translations in other languages. The framework uses English as the default language. Strings are identified using their English version. Typically, internationalization frameworks use alphanumeric IDs for UI strings. Using the English version of the string as the ID has several advantages:
- Code is easy to read.
- The default language is always available.
Translation changes need to come from Git via the CI/CD pipeline in AEM as a cloud service.
Overlaying Strings in System Dictionaries overlaying-strings-in-system-dictionaries
If your components use strings that are included in the AEM system dictionaries, duplicate the string in your own dictionary. All components will use the strings from your dictionary.
Note that you cannot predict which translation is used when strings are duplicated in dictionaries that are all located below the /apps
node.