作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在文件夹hello.txt
和en.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/
有一条(相对)众所周知的 Perl 公理:“只有 Perl 可以解析 Perl”。我想知道 Perl 6 是否仍然如此? 扩大讨论...考虑到 PyPy 最近的更新,我想到了这个问题。 Perl 独特
这是设置。在上一个问题中,我发现我可以通过子组件中的状态传递对象属性,然后使用 componentDidUpdate 获取该对象属性。在这种情况下,状态和属性都称为到达。 这是基本代码... expo
我运行的是 10.5.2 社区版。我已经标记了 源/主要/资源 作为源目录。我可以右键单击并“编译”某些文件,据我所知,这意味着 IDE 将文件复制到与发送类文件的“com.mydomain.pack
我是一名优秀的程序员,十分优秀!