AEM forms currently supports localization of adaptive forms content like captions, help content, and validation messages in English(en), French(fr), German(de), and Japanese(ja) locales. However, you can add support for new locales other than the default supported locales.

This article describes how to add support for a new language in Adaptive Forms.

Add a locale to the GuideLocalizationService service

  1. Go to http://[server]:[port]/system/console/configMgr.
  2. Click to edit the Guide Localization Service component.
  3. Add the locale you want to add to the list of supported locales.
GuideLocalizationSevice

Add XFA client library for a locale

Create a node of type cq:ClientLibraryFolder under etc/<folderHierarchy>, with category  xfaforms.I18N.<locale>, and add the following files to the client library:

  • I18N.js defining xfalib.locale.Strings for the <locale> as defined in /etc/clientlibs/fd/xfaforms/I18N/ja/I18N.
  • js.txt containing the following:
/etc/clientlibs/fd/xfaforms/I18N/Namespace.js
I18N.js
/etc/clientlibs/fd/xfaforms/I18N/LogMessages.js

Add adaptive form client library for a locale

Create a node of type cq:ClientLibraryFolder under etc/<folderHierarchy>, with category as guides.I18N.<locale> and dependencies as xfaforms.I18N.<locale>, guide.common. Add the following files to the client library:

  • i18n.js defining guidelib.i18n, having patterns of "calendarSymbols", datePatterns, timePatterns, dateTimeSymbols, numberPatterns, numberSymbols, currencySymbols, typefaces for the <locale> as per the XFA specifications described in Locale Set Specification. You can also see how it is defined for other supported locales in /etc/clientlibs/fd/af/I18N/fr/javascript/i18n.js.
  • LogMessages.js defining guidelib.i18n.strings and guidelib.i18n.LogMessages for the <locale> as defined in /etc/clientlibs/fd/af/I18N/fr/javascript/LogMessages.js.
  • js.txt containing the following:
i18n.js
LogMessages.js

Add locale support for the dictionary

Perform this step only if the <locale> you are adding is not among en, de, es, fr, it, pt-br, zh-tn, zh-tw, ja, ko-kr.

  1. Create an nt:unstructured node languages under etc, if not present already.
  2. Add a multi-valued string property languages to the node, if not present already.
  3. Add the <locale> default locale values de, es, fr, it, pt-br, zh-tn, zh-tw, ja, ko-kr, if not present already.
  4. Add the to <locale> the values of languages property of /etc/languages.

The <locale> will appear at http://[server]:[port]/libs/cq/i18n/translator.html.

Download

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy