Miguel Araujo Perez e062a7e807 Wrong variable name
2015-12-14 11:39:36 +01:00

16 lines
354 B
JavaScript

'use strict';
let { Platform, NativeModules } = require('react-native')
let { RNI18n } = NativeModules
let I18n = require('./vendor/i18n')
if (Platform.OS === 'android') {
RNI18n.getCurrentLocale( function(locale) {
I18n.locale = locale.replace(/_/, '-');
});
} else {
I18n.locale = RNI18n.locale.replace(/_/, '-');
}
module.exports = I18n;