ios react native detect locale

Solutions on MaxInterview for ios react native detect locale by the best coders in the world

showing results for - "ios react native detect locale"
Edoardo
22 Nov 2019
1import { NativeModules, Platform } from 'react-native'
2
3const locale = Platform.select({
4  ios: NativeModules.SettingsManager?.settings?.AppleLocale || NativeModules.SettingsManager?.settings?.AppleLanguages[0],
5  android: NativeModules.I18nManager.localeIdentifier,
6})