|AEM as a Cloud Service||Click here|
|AEM 6.5||This article|
The localization of adaptive forms relies on two types of locale dictionaries:
Form-specific dictionary Contains strings used in adaptive forms. For example, labels, field names, error messages, help descriptions, and so on. It is managed as a set of XLIFF files for each locale and you can access it at
There are two methods to identify the locale of the adaptive form. When an adaptive form is rendered, it identifies the requested locale by :
looking at the
[local] selector in the adaptive form URL. The format of the URL is
[local] selector allows caching an adaptive form.
looking at the following parameters in the specified order:
To override the browser locale of users, you can pass the
afAcceptLang request parameter to force the locale. For example, the following URL will force to render the form in Japanese locale:
The browser locale set for the user, which is specified in the request using the
Language setting of the user specified in AEM.
Browser locale is enabled, by default. To change browser locale setting,
Once the locale is identified, the adaptive forms picks the form-specific dictionary. If the form-specific dictionary for the requested locale is not found, it uses the dictionary for language in which adaptive form was authored.
If no locale information is present, adaptive form is delivered in the original language of the form. The original language is the language used while developing the adaptive form.
If a client library for the requested locale doesn’t exist, it checks for a client library for the language code present in the locale. For example, if the requested locale is
en_ZA (South African English) and the client library for
en_ZA doesn’t exist, the adaptive form will use the client library for
en (English) language, if it exists. However, if none of them exist, the adaptive form uses the dictionary for
AEM Forms currently supports localization of adaptive forms content in English (en), Spanish (es), French (fr), Italian (it), German (de), Japanese (ja), Portuguese-Brazilian (pt-BR), Chinese (zh-CN), Chinese-Taiwan (zh-TW), and Korean (ko-KR) locales.
To add support for a new locale at adaptive forms runtime:
Create a node of type
etc/<folderHierarchy>, with category
xfaforms.I18N.<locale>, and add the following files to the client library:
xfalib.locale.Strings for the
<locale> as defined in
js.txt containing the following:
/libs/fd/xfaforms/clientlibs/I18N/Namespace.js I18N.js /etc/clientlibs/fd/xfaforms/I18N/LogMessages.js
Create a node of type
etc/<folderHierarchy>, with category as
guides.I18N.<locale> and dependencies as
Add the following files to the client library:
guidelib.i18n, having patterns of “calendarSymbols”,
<locale>as per the XFA specifications described in Locale Set Specification. You can also see how it is defined for other supported locales in
<locale>as defined in
Perform this step only if the
<locale> you are adding is not among
etc, if not present already.
Add a multi-valued string property
languages to the node, if not present already.
<locale> default locale values
ko-kr, if not present already.
<locale> to the values of the
languages property of
<locale> will appear at
Restart the AEM server for the added locale to come into effect.
Sample client libraries for adding support for Spanish