gpt4 book ai didi

ios - 本地化只能在iOS 7中使用,而不能在iOS 8中使用

转载 作者:行者123 更新时间:2023-12-01 18:55:50 25 4
gpt4 key购买 nike

我在文件夹hello.txten.lproj中具有文件fr.lproj的本地化版本。
当我在iOS 7模拟器上以语言设置为法语运行以下代码时,将加载法语版本。但是使用法语的iOS 8,我只会得到英语...为什么?

println (NSLocale.preferredLanguages().first!)
println (NSBundle.mainBundle().preferredLocalizations.first!)
let path = NSBundle.mainBundle().pathForResource ("hello", ofType: "txt")
let text = NSString (contentsOfURL: NSURL (fileURLWithPath: path!)!, encoding: NSUTF8StringEncoding, error: nil)
println (text!)

最佳答案

Xcode 6.1中的已知问题:

本地化和键盘设置(包括第三方键盘)为
iOS中的Safari, map 和开发人员应用未正确兑现
8.1模拟器。 [NSLocale currentLocale]返回en_US,并且仅英语和Emoji键盘可用。 (18418630,18512161)

Xcode 6 GM起存在问题

关于ios - 本地化只能在iOS 7中使用,而不能在iOS 8中使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27212336/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com