Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ios react native detect locale

import { NativeModules, Platform } from 'react-native'

const locale = Platform.select({
  ios: NativeModules.SettingsManager?.settings?.AppleLocale || NativeModules.SettingsManager?.settings?.AppleLanguages[0],
  android: NativeModules.I18nManager.localeIdentifier,
})
 
PREVIOUS NEXT
Tagged: #ios #react #native #detect #locale
ADD COMMENT
Topic
Name
4+3 =