react-native-i18n/index.js

11 lines
225 B
JavaScript
Raw Normal View History

2017-04-07 17:21:55 +00:00
// @flow
2015-06-14 10:47:18 +00:00
2017-04-07 17:21:55 +00:00
import { NativeModules } from 'react-native';
import I18n from 'i18n-js';
const { RNI18n } = NativeModules;
2015-06-14 12:14:02 +00:00
2017-05-25 15:49:37 +00:00
I18n.locale = RNI18n.languages[0];
2017-04-07 17:21:55 +00:00
2017-05-25 15:49:37 +00:00
export const getLanguages = RNI18n.getLanguages;
2017-04-07 17:21:55 +00:00
export default I18n;