简体   繁体   English

更改Xcode项目的单一语言

[英]Change Single Language of Xcode Project

How do you change the default language used by your project without doing localization? 如何在不进行本地化的情况下更改项目使用的默认语言? What if I want my app to be in Japanese or Italian? 如果我希望我的应用使用日语或意大利语怎么办? Is it enough to just use Japanese or Italian texts? 仅使用日语或意大利语文字就足够了吗? How do I change the language displayed on iTunes to say that it's in Japanese or Italian? 如何更改iTunes上显示的日语或意大利语语言?

Generally, the resources that you put in the main folder are assumed to be in the Default language , which is set in iTunes Connect when you add or edit the application. 通常,假定您放置在主文件夹中的资源使用Default language ,这是您添加或编辑应用程序时在iTunes Connect中设置的。 The setting is on the Application page and if it's not correctly set after adding it, click the Edit at the top of the page to be able to change it with the drop-down menu. 该设置位于“ Application页面上,如果添加后未正确设置,请单击页面顶部的“ Edit以使用下拉菜单进行更改。

If you're going to localize at all, you'll want to make sure to change the localization native language, you'll need to change the key in the Info.plist corresponding to Localization native development region (aka CFBundleDevelopmentRegion in raw form) to match the language you are using for the raw files. 如果要进行本地化,则需要确保更改localization native语言,您需要更改Info.plistLocalization native development region (即原始格式的CFBundleDevelopmentRegion )相对应的键。匹配您用于原始文件的语言。 The value of the tag should match the original localization language directory base (so en if you have an english lproj directory named en.lproj ). 标签的值应与原来的本地化语言基本目录(这样en ,如果你有一个英文lproj目录中名为en.lproj )。 This language will be used in the event that one of the other localizations is missing for the specific resource. 如果特定资源缺少其他本地化版本之一,则将使用此语言。 Recommendations these days point to using the 2-letter version of the language (ie en instead of English , jp instead of Japanese , etc) as best-practice. 这些天的建议指向使用该语言的2个字母的版本(即,用en代替English ,用jp代替Japanese ,等等)作为最佳实践。

If you're building a Japanese-only app, you could just put all the resources in the top level. 如果要构建仅日语的应用程序,则可以将所有资源放在顶层。 If you're going to have Japanese and any other language, you should put the language-specific Japanese resources in jp.lproj and set the CFBundleDevelopmentRegion to jp . 如果要使用日语和任何其他语言,则应将特定于语言的日语资源放在jp.lproj ,并将CFBundleDevelopmentRegion设置为jp Any unlocalized resources (standard images, etc.) can be stored in the main application folder. 任何未本地化的资源(标准图像等)都可以存储在主应用程序文件夹中。

By the way, same general rules in OS X as well, except that wherever I mentioned "main application folder" above, the files would be within the Resources folder. 顺便说一句,在OS X中也有相同的一般规则,除了我在上面提到的“主应用程序文件夹”的任何地方,文件都在Resources文件夹内。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM