What's the best way to get device locale in react native (iOS)?

后端 未结 14 1640
清歌不尽
清歌不尽 2020-12-13 03:35

Something similar to [NSLocale currentLocale] in Objective-C.

14条回答
  •  春和景丽
    2020-12-13 04:29

    I am using the i18n package (react-native-i18n). And then it's just:

    I18n = require('react-native-i18n')
    locale = I18n.currentLocale()
    

提交回复
热议问题