Configuring mapping of custom locale names to Elasticsearch languages
If you use custom strings to denote the language of your DITA content, you need to configure how those custom strings map to Elasticsearch languages.
About this task
The Elasticsearch search engine indexes search strings by two-letter language codes (for example, fr for French). In SDL Tridion Docs, DITA content can denote its language the same way (for example, using en for English). But the DITA content can also use a five-character language-plus-locale string (for example, en-us for US English) or a custom string (for example, Anglais for English) to denote the content language.
By default, SDL Tridion Docs assumes that the first two characters of the DITA language value denote the correct Elasticsearch language in which to index. This approach works for strings such as en and en-us: both resolve to en, the right Elastisearch language. But this approach does not work for strings like Anglais, which resolves to the meaningless string An. In that last case, you must configure how your custom language values map to Elasticsearch languages.