Something similar to [NSLocale currentLocale] in Objective-C.
标签:
react-native
相关问题
- React Native Inline style for multiple Text in sin
- How Do I Convert Image URI into Byte Expo
- ApolloClient from apollo-boost attemped to assign
- Implementing ssl pinning in a react-native applica
- React-Native: Enable Performance Monitor in produc
相关文章
- Why do we have to call `.done()` at the end of a p
- Remove expo from react native
- React Native - Dynamic Image Source
- “Unfortunately, app has stopped” error with buildi
- eslint Parsing error: Unexpected token =
- How to determine JS bottlenecks in React Native co
- How to override navigation options in functional c
- PanResponder snaps Animated.View back to original
if you develop over Expo... you can use:
console.log(await NativeModules.ExponentUtil.getCurrentLocaleAsync());
console.log(await NativeModules.ExponentUtil.getCurrentDeviceCountryAsync());
console.log(await NativeModules.ExponentUtil.getCurrentTimeZoneAsync());
I am using the i18n package (react-native-i18n). And then it's just:
I am using react-native-i18n
in order to access the device's language I used:
It's all in the documentation.
iOS 13 workaround here:
I found this solution for Android and iOS (RN 0.35)
May be this will help to someone, but iOS not shows locale property. It shows only rtl support now.