📌  相关文章
📜  ios react native 检测语言环境 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:39.344000             🧑  作者: Mango

代码示例1
import { NativeModules, Platform } from 'react-native'

const locale = Platform.select({
  ios: NativeModules.SettingsManager?.settings?.AppleLocale || NativeModules.SettingsManager?.settings?.AppleLanguages[0],
  android: NativeModules.I18nManager.localeIdentifier,
})