From 715d15f91de0b7c62e30ad11a788a488286d1a84 Mon Sep 17 00:00:00 2001 From: Gustavo Emanuel Farias Rosa Date: Tue, 12 Apr 2022 17:59:15 -0300 Subject: [PATCH] implementing fall back to lenguage in Intl --- react-native/app/translations/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/react-native/app/translations/index.ts b/react-native/app/translations/index.ts index b22fce0..a1164f5 100644 --- a/react-native/app/translations/index.ts +++ b/react-native/app/translations/index.ts @@ -2,10 +2,12 @@ import i18next from 'i18next' import RNLanguages from 'react-native-languages'; import resources from './resources'; -export const initTranslation = ()=>{ +export const initTranslation = ()=>{ + console.log(RNLanguages.language) i18next.init({ compatibilityJSON: 'v3', lng: RNLanguages.language, - resources: resources + resources: resources, + fallbackLng: 'en-US', }) } \ No newline at end of file