Closed Mafrans closed 4 years ago
I currently use a switch function that checks for the language, defaulting to english if no translation is found. This means i can just use different variables as case statements followed by loading a given language inside said statement.
Due to reading Googles language setting however, this currently isn't a problem; Google defaults "en_US"/"en_GB" to "en" and uses different abbreviations for some accents.
Simplifying language codes may cause issues in the future, as some language codes contain different accents varying wildly. A better example would be including an array of supported languages.
Example
lang: en
would becomelangs: ['en_GB', 'en_US', ...]