|
|
|
@ -9,9 +9,8 @@ async function getFirstPreferredLangCode () { |
|
|
|
|
const userPreferredLocaleCodes = await promisify( |
|
|
|
|
extension.i18n.getAcceptLanguages, |
|
|
|
|
{ errorFirst: false } |
|
|
|
|
)().catch(err => console.log('err123', err)) |
|
|
|
|
)() |
|
|
|
|
const firstPreferredLangCode = userPreferredLocaleCodes.find(code => existingLocaleCodes.includes(code)) |
|
|
|
|
// const firstPreferredLangCode = userPreferredLocaleCodes[0]
|
|
|
|
|
return firstPreferredLangCode || 'en' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|