Translate Content to a Custom Language
Adobe Experience Manager is flexible and can be configured for any language. AEM supports both 2 letter locales (en, fr, de) as well as 5 letter locales in the format of <language-code>_<country-code> (en_US, fr_FR, de_DE) or <language-code>-<country-code> (en-US, fr-FR, de-DE). The supported language code is a two-letter code as defined by ISO-639-1. The supported country code is a lower-case or upper-case two-letter code as defined by ISO 3166. Refer to the AEM documentation for more details.
List of default languages can be found in:
- CRXDE by navigating to
/libs/wcm/core/resources/languages
- Or if you create a
Translation Project
.
There are two steps for adding your custom language:
- Add Custom Language to AEM
- Configure language mapping for Smartling connector
Add Custom Language to AEM
- Open up CRXDE (http://localhost:4502/crx/de/index.jsp) and then browse to
/libs/wcm/core/resources/languages
- You will see the list of languages that you see in the Translation Project. The language list is sorted by language code and not the language name.
- DO NOT MAKE CHANGES to this list.
/libs
is restricted and the changes can be overwritten by AEM installers. - Smartling will override this list in
/apps
. We will follow the same path as inlibs
, but replacelibs
with/apps
. - Create a new folder name core (if it doesn’t exist), under
/apps/wcm
, and click Save All. - Browse to
/libs/wcm/core/resources
. Select the resources node and copy it. - Browse to the core folder under
/apps
(/apps/wcm/core
); select core and paste the copied content here and Save All.
If you see an error, it's because you have not saved the core folder that was created in the previous step. - Add the new custom language. For example, “es-US” (Spanish - United States).
- Clone any existing language (copy/paste it).
- The new node will get added at the bottom of the languages list. Find and edit it:
- Node name = es-US
- Property “country” = “United States”
- Property “language” = “Spanish - United States”
- Save all changes. The new language should look like this:
- Don’t forget to restart AEM, or simply restart the
com.adobe.granite.translation.core.impl.TranslationConfigService
component.
Open Web Console Components (http://localhost:4502/system/console/components) Search forTranslationConfigService
and stop it. - Reload page and search for
TranslationConfigService
again and start it.
You are done! AEM now knows about your “es-US” language.
Configure Language Mapping for Smartling Connector
Before you start to use the new custom language with the Smartling connector, you should set the proper language mapping (which locale in Smartling should be used for this language).
- Open CRXDE (http://localhost:4502/crx/de/index.jsp) and then browse to
/apps/granite/translation/connector/config/smartling/languageMapping
- Clone any existing language (Copy and Paste it).
- The new node will get added at the bottom of the languages list. Find it and edit:
Node name = “es-US”. It should use the AEM language code.
Property “languageMapping” = “es”. This is the locale code in Smartling. In this case, we decided to map AEM “Spanish - United States” to Smartling “Spanish (International)”. - Save the changes.
You can now submit pages for the es-US
language.