Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道我可以轻松获取设备的当前语言环境,但在我的情况下,用户从 UIPickerView 中选择语言。每种语言都是数组中的一个字符串,其输入方式与手机在设置设备语言的设置中的输入方式完全相同。
是否可以从 @"English" 或 @"Arabic" 之类的字符串中获取语言缩写?
谢谢!
NSLocale's+canonicalLocaleIdentifierFromString:做这个翻译。
NSLocale
+canonicalLocaleIdentifierFromString: