Use native language names in the language picker

This seems more intuitive to me and is what I've seen in most other
language pickers.
This commit is contained in:
rinpatch 2021-01-20 23:49:34 +03:00
parent fe78ed78fd
commit 11c7355749
3 changed files with 26 additions and 15 deletions

View file

@ -0,0 +1,12 @@
const specialLanguageCodes = {
'ja_easy': 'ja',
'zh_Hant': 'zh-HANT'
}
const internalToBrowserLocale = code => specialLanguageCodes[code] || code
const localeService = {
internalToBrowserLocale
}
export default localeService