mirror of
https://github.com/status-im/react-native-i18n.git
synced 2025-01-21 17:39:25 +00:00
c6691e049a
- replace let with const - check existence of `RNI18n` when accessing it's properties - remove unnecessary code
10 lines
225 B
JavaScript
10 lines
225 B
JavaScript
'use strict';
|
|
|
|
const { NativeModules } = require('react-native');
|
|
const { RNI18n } = NativeModules;
|
|
let I18n = require('./vendor/i18n');
|
|
|
|
I18n.locale = (RNI18n) ? RNI18n.locale.replace(/_/, '-') : '';
|
|
|
|
module.exports = I18n;
|