Skip to content

Commit

Permalink
fix language support (#947)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-whitman authored Sep 20, 2021
1 parent 58e0d18 commit fb3b13e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/i18n/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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')
Expand Down

0 comments on commit fb3b13e

Please sign in to comment.