xcode 本地化本地开发区域、基础本地化和 Appstore 语言(捆绑)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27722789/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 06:26:15  来源:igfitidea点击:

Localization native development region, base localization and Appstore language (bundle)

iosobjective-cxcodelocalization

提问by Andrea

I do understand that "Localization native development region" is a fallback for languages that are missing in the project.

我确实理解“本地化本地开发区域”是项目中缺少的语言的后备。

I do understand that the language shown in the Appstore comes from the bundle and its directories structure, but how can i make the base localization match the development region?

我知道 Appstore 中显示的语言来自捆绑包及其目录结构,但我如何才能使基本本地化与开发区域相匹配?


On Xcode 6 the default setting is English for development language with base localization checked & the same in the info.plist.


在 Xcode 6 上,开发语言的默认设置是英语,并在 info.plist 中检查了基本本地化。

I've already read the suggested questions & answers but i still haven't a clear answer.

我已经阅读了建议的问题和答案,但我仍然没有明确的答案。

The directory structure of that project has only one dir called Base.lproj, if I change the info.plist localization native development region doesn't affect the fact that the project is recognized to have an English development language.

该项目的目录结构只有一个名为 Base.lproj 的目录,如果我更改 info.plist 本地化本地开发区域不会影响项目被识别为具有英语开发语言的事实。

If I add a localization according to the new value in the info.plist, remove the base localization, remove the English localization(moving to trash leaving no trace), reselect the base localization saying that the base localization refers to say Spanish as a reference language, the bundle is still recognized as English.

如果我根据info.plist中的新值添加本地化,​​删除基础本地化,删除英文本地化(移至垃圾箱不留痕迹),重新选择基础本地化,说基础本地化指的是说西班牙语作为参考语言,该捆绑包仍被识别为英语。

How can i set the base internationalization to match another language than English?

如何设置基本国际化以匹配除英语之外的另一种语言?

回答by Andrea

This a trick more than an answer, a real solution is really hard to find if you want to keep the Base localization.
Right after the creation of a new project, open the xcodeproj file manually in a text editor. After few line you'll find something like that:

这是一个技巧而不是答案,如果您想保留 Base 本地化,则很难找到真正的解决方案。
创建新项目后,立即在文本编辑器中手动打开 xcodeproj 文件。几行之后你会发现类似的东西:

developmentRegion = English;
            hasScannedForEncodings = 0;
            knownRegions = (
                en,
                Base,
            );

By changing manually developmentRegionand the reference in knownRegions, is possible to obtain in the info tab under xcode 6 a localization like yourlanguage-Development language.
I've filed a radar (n° 19438250) to Apple asking a dropdown menu' to chose the development language of the project or clarify that problem.

通过手动更改developmentRegion和 中的引用knownRegions,可以在 xcode 6 下的信息选项卡中获得类似 yourlanguage-Development 语言的本地化。
我已经向 Apple 提交了一份雷达 (n° 19438250),要求使用下拉菜单来选择项目的开发语言或澄清该问题。