Skip to content

Commit

Permalink
Merge pull request #380 from EinfachAleks/issues/374
Browse files Browse the repository at this point in the history
fix(issues/374): remove console log on i18n file
  • Loading branch information
KirDE authored Sep 9, 2024
2 parents 4a94c69 + 6c5f9c8 commit edc26dd
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,13 @@ const supportedLngs = {

const getLanguageToUse = () => {
const languages = navigator.languages
console.log('preferred language order:', JSON.stringify(languages))
for (const language of languages) {
for (const pair of Object.entries(supportedLngs)) {
const code = pair[0]
const regex = pair[1]
if (regex.test(language)) {
console.log('using language:', code)
return code
}
if (language.match(regex)) return code
}
}
console.log('using fallback language: en')
return 'en'
}

Expand Down

0 comments on commit edc26dd

Please sign in to comment.