mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-09 10:13:42 +00:00
Use window.navigator.language before interface i18n language
This commit is contained in:
parent
52b0b6f008
commit
c9dc8f00f9
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ const specialLanguageCodes = {
|
|||
'zh': 'zh-Hans'
|
||||
}
|
||||
|
||||
const internalToBrowserLocale = code => specialLanguageCodes[code] || code
|
||||
const internalToBrowserLocale = fallbackCode => specialLanguageCodes[fallbackCode] || window.navigator.language || fallbackCode
|
||||
|
||||
const internalToBackendLocale = code => internalToBrowserLocale(code).replace('_', '-')
|
||||
|
||||
|
|
Loading…
Reference in a new issue