added missing behaviour
This commit is contained in:
parent
a3fa5070c2
commit
1b1e3fa1b0
|
@ -5,8 +5,5 @@
|
|||
import { AppRegistry } from 'react-native'
|
||||
import App from './App'
|
||||
import { name as appName } from './app.json'
|
||||
import { setupi18n } from './utils/translation'
|
||||
|
||||
setupi18n()
|
||||
|
||||
AppRegistry.registerComponent(appName, () => App)
|
||||
|
|
|
@ -39,9 +39,11 @@ export const LanguageService = {
|
|||
if (langCode) {
|
||||
i18n.translations = { [langCode]: Strings }
|
||||
i18n.locale = langCode
|
||||
i18n.fallbacks = true
|
||||
I18nManager.forceRTL(isRTL(langCode))
|
||||
}
|
||||
i18n.fallbacks = true
|
||||
i18n.defaultLocale = 'sv'
|
||||
i18n.missingBehaviour = 'guess'
|
||||
|
||||
moment.locale(langCode)
|
||||
},
|
||||
|
@ -66,3 +68,5 @@ export const LanguageService = {
|
|||
changeListeners[`${key}`] = (langCode) => cb(langCode)
|
||||
},
|
||||
}
|
||||
|
||||
export const i18nService = i18n
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
import i18n from 'i18n-js'
|
||||
|
||||
export const setupi18n = () => {
|
||||
i18n.defaultLocale = 'sv'
|
||||
i18n.fallbacks = true
|
||||
}
|
||||
|
||||
export const translations = {
|
||||
ar: require('../translations/ar.json'),
|
||||
de: require('../translations/de.json'),
|
||||
|
|
Loading…
Reference in New Issue