Babel to name language in native form

Summary

4-language menu actually shows:
German English French Spanish
It should show:
Deutsch English Français Español

This worked up to Babel-3.1.1 (by hacking “language-subtag-registry”).
It failed when updating to Babel-3.5.0

Step to reproduce

[[!BabelLinks? &showCurrent=`1` &includeUnlinked=`1`]]

Observed behavior

German English French Spanish

Expected behavior

Deutsch English Français Español

Environment

MODX 3.0.4
babel-3.5.0

Where did you make the changes?
In the file core/components/babel/src/LanguageSubtagRegistry/language-subtag-registry or in the cache file core/cache/babel/languages.cache.php?
Maybe you have to delete the cache file, to see the changes you made to language-subtag-registry?


It could also be wiser to use a custom template (&tpl) that outputs the correct strings based on the cultureKey placeholder, than to ‘hack’ a file in the code of the Babel extra.

I had made the changes to core\components\babel\vendor\iana-language-subtag-registry\language-subtag-registry. This worked in the past.
When doing it to core/components/babel/src/LanguageSubtagRegistry/language-subtag-registry and deleting core/cache the desired result shows up.
Thanks for your prompt support!

You can use the following lexicon tag in the chunk referenced by the tpl property of the BabelLinks snippet call:

[[%babel.language_[[+cultureKey]]? &topic=`languages` &namespace=`babel`]]

Then you don’t have to patch Babel each time it is updated.