File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,15 +4,13 @@ import AsyncStorage from '@react-native-community/async-storage';
44import { NativeModules } from 'react-native' ;
55import { Platform } from 'react-native' ;
66
7- // TODO de
8- import { en } from './translations' ;
7+ import { en , de } from './translations' ;
98
109function localeToLanguage ( locale ) {
1110 return locale . replace ( '_' , '-' ) ;
1211}
1312
14- i18n . use ( initReactI18next )
15- . use ( {
13+ i18n . use ( {
1614 type : 'languageDetector' ,
1715 async : true ,
1816 init : ( ) => { } ,
@@ -39,14 +37,15 @@ i18n.use(initReactI18next)
3937 detectedLanguage = localeToLanguage ( androidLocale ) ;
4038 }
4139 }
42-
40+
4341 callback ( detectedLanguage ) ;
4442 } ,
4543 cacheUserLanguage : ( ) => { } ,
4644 } )
45+ . use ( initReactI18next )
4746 . init ( {
4847 resources : {
49- // de,
48+ de,
5049 en,
5150 } ,
5251 fallbackLng : 'en' ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import './i18n';
55
66// uncomment if you want to hide the yellow boxes for demo purposes
77// console.disableYellowBox = true;
8+
89AppRegistry . registerComponent ( 'Cotect' , ( ) => App ) ;
910
1011if ( Platform . OS === 'web' ) {
You can’t perform that action at this time.
0 commit comments