mirror of
https://github.com/Luzifer/ots.git
synced 2024-12-12 09:04:36 -05:00
Fix: Use full browser provided language tag
instead of limiting to only the primary tag Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
fde887bb6a
commit
ff91301acc
@ -18,7 +18,7 @@ const cookieSet = Object.fromEntries(document.cookie.split('; ')
|
|||||||
.map(el => decodeURIComponent(el))))
|
.map(el => decodeURIComponent(el))))
|
||||||
|
|
||||||
const i18n = new VueI18n({
|
const i18n = new VueI18n({
|
||||||
locale: cookieSet.lang?.split(/[_-]/)[0] || navigator?.language?.split(/[_-]/)[0] || 'en',
|
locale: cookieSet.lang || navigator?.language || 'en',
|
||||||
fallbackLocale: 'en',
|
fallbackLocale: 'en',
|
||||||
messages,
|
messages,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user