AEM: How to troubleshoot a "non-supported language list" issue while creating a language copy

Introduction

The AEM translation API needs language copies to specify where the content that is to be translated is placed. You need to have language copies configured, otherwise translation will be performed “in-place".

The error shown below usually occurs when AEM fails to identify where the language root is. To create the language root, create a page and use an ISO language code as the value for the Name property. The language code must be in one of the following formats:

  • <language-code> The supported language code is a two-letter code as defined by ISO-639-1, for example: “en”, “de”.

  • <language-code>_<country-code> or <language-code>-<country-code> → The supported country code is a lower-case or upper-case two-letter code as defined by ISO 3166, for example: "en_US", "en_us", "en_GB", "en-gb".

Unfortunately, it is not always possible to define a node in this way, and the language root has a different name. In this case, AEM will throw the described error.


Guidelines

Fixing this issue is quite simple, yet not very well documented by Adobe. On your language root, add the following properties:

  • cq:isLanguageRoot {Boolean} true;

  • jcr:language {String} <ISO3166 complaint code>.

IMPORTANT!

Make this change for all non-standard language root paths.

When these two properties have been added, you should be able to create language copies. See the official documentation for language roots.