I had to read the source code to determine how i18next.languages is set and used; I can make a PR if preferred, but I'm not 100% confident that my documentation will be technically accurate, as I've only spent a few minutes reading the code.
I am considering rewriting it as such:
i18next.languages
Is set to an array of language-codes that will be used in order to lookup the translation value.
When the language is set, this array is populated with the new language code, which by default falls back to the less specific versions ("en-US-xx", "en-US", "en"), followed by the list of fallback codes.
Values are unique, so if they appear earlier in the array, they will not be added again.
I had to read the source code to determine how
i18next.languages
is set and used; I can make a PR if preferred, but I'm not 100% confident that my documentation will be technically accurate, as I've only spent a few minutes reading the code.I am considering rewriting it as such:
Please let me know your thoughts.