From 6c5f9c81d0174e9296feffc36d49198d117683e3 Mon Sep 17 00:00:00 2001 From: Aleksej Messer Date: Sat, 17 Aug 2024 23:35:52 +0200 Subject: [PATCH] fix(issues/374): remove console log on i18n file --- src/i18n.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/i18n.ts b/src/i18n.ts index e778ad78..86433b43 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -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' }