In the get_addons function we get the list of preferred languages and add “en”. Then we look for listings files of the format addons-<lang>.json
where <lang>
is a two character language code. So the file addons-en.json
is the fallback and should always exist.
The user can also provide their preferences the LANGUAGE
environment variable. For example, if the user sets LANGUAGE=fr:de
then we will look for French, then German, and finally English. The English version should always exist.