From 6f91a691d8b6017e4fa756d8ce280e8b6e68659b Mon Sep 17 00:00:00 2001 From: Tyler Whitman Date: Mon, 20 Sep 2021 11:38:55 -0700 Subject: [PATCH] fix language support --- src/utils/i18n/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/i18n/index.tsx b/src/utils/i18n/index.tsx index 153c9ae22..7cda83329 100644 --- a/src/utils/i18n/index.tsx +++ b/src/utils/i18n/index.tsx @@ -18,8 +18,10 @@ export const [currencyType] = RNLocalize.getCurrencies() || ['USD'] export const usesMetricSystem = RNLocalize.usesMetricSystem() let phoneLang = 'en' +let phoneLocale = 'en-US' if (Array.isArray(locales)) { - phoneLang = locales[0].languageTag + phoneLang = locales[0].languageCode + phoneLocale = locales[0].languageTag } const hotspotMakerTranslations = getTranslations() @@ -35,7 +37,7 @@ i18n.use(initReactI18next).init({ fallbackLng: ['en'], }) -export const locale = phoneLang +export const locale = phoneLocale export const useLanguage = () => { const [language, setLanguage] = useState('en')