这有点令人困惑:
首先我使用了 genstrings,它在 en.lproj 文件夹中创建了一个 Localized.strings 文件(也存在于类似的文件系统中)。
然后我有一个想要本地化的 JSON 文件,因此我打开该文件的信息窗格并选择“使文件可本地化”。然后 Xcode 在文件系统上创建了一个 English.lproj 文件夹以及一个名为这样的组。然后它把我的文件移到那里。
所以现在我最终有了 en.lproj 和 English.lproj 基本上是同一件事:英语的东西。
我对这种情况并不满意。我可以/应该做些什么吗?我该如何解决这个问题?
另外,有人可以指出使用“English.lproj”与“en.lproj”之间有什么区别吗?我敢打赌是有区别的。
This is a bit confusing:
First I used genstrings, which created me a Localizable.strings file inside an en.lproj folder (also exists on the file system like that).
Then I had a JSON file which I wanted to localize, so I opened the info-pane for that file and choose "Make File Localizable". Xcode then created an English.lproj folder on the file system and also a group called like this. It then moved my file into there.
So now I ended up having en.lproj and English.lproj for basically the same thing: English stuff.
I'm not happy with this situation. Can / should I do anything about it? How can I fix that?
Also, can someone point out what's the difference between using "English.lproj" vs. "en.lproj"? I bet there is a difference.
发布评论
评论(2)
这是一个 Xcode 错误。只需将
English.lproj
文件夹中的所有内容移动到en.lproj
文件夹即可。我没有检查过 Xcode 4.1,但如果删除English.lproj
文件夹,以前版本的 Xcode 将不允许您添加新的本地化,因此不要删除它。您可以手动编辑项目文件以避免出现问题正如这篇文章所建议的,但我已经从来没有真正发现这样做是值得的。
一些背景知识 - 在 Max OS X 10.4 之前,使用了旧的(但更易于用户阅读)名称,例如“English”、“Spanish”等,但 Apple 国际化文档 指出这些值现已弃用:
It's an Xcode bug. Just move everything in the
English.lproj
folder toen.lproj
folder. I haven't checked with Xcode 4.1, but previous versions of Xcode wouldn't allow you to add new localizations if you delete theEnglish.lproj
folder, so don't delete it.You could manually edit your project file to avoid the problem as this post suggest, but I've never really found doing so to be worth it.
Some background -- prior to Max OS X 10.4 the legacy (but more user-readable) names such as “English”, “Spanish”, etc., were used, but the Apple internationalization documentation states that these values are now deprecated:
您应该使用 ISO-639-1(两个字母)或 ISO-639-2(三个字母)语言代码来实现英语以外的所有语言的本地化目的。 XCode 仍然使用“English”而不是“en”作为默认本地化。
有关信息,请参阅 http://eschatographer.net/blog/?p=224。
You should use ISO-639-1 (two-letter) or ISO-639-2 (three-letter) language codes codes for localization purposes of all languages other than English. XCode still uses “English” instead of “en” as their default localization.
See http://eschatologist.net/blog/?p=224 for info.