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.
[NSLocale preferredLanguages] 将语言代码数组作为字符串返回。索引 0 处的对象返回设备的当前语言设置,但列表的其余部分(如果它长于长度 1)是如何确定的?
想通了。[NSLocale preferredLanguages] 基于 Settings App --> General --> International --> Language 下的列表。可以在 iOS 模拟器中查看默认列表,方法是转到 iOS 模拟器 --> 重置内容和设置,然后转到语言列表。如果用户选择了一种新语言,该语言将位于列表顶部。
标签