如何将本地化语言添加到 Xcode 4.4?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12094860/
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
How to add localization language to Xcode 4.4?
提问by LearnCocos2D
In reference to this guide: How to localize my app with Xcode 4?
参考本指南: 如何使用 Xcode 4 本地化我的应用程序?
I noticed that under Localization, my Xcode 4.4 shows no [+] button:
我注意到在本地化下,我的 Xcode 4.4 没有显示 [+] 按钮:
How can I add languages to the Localization list?
如何将语言添加到本地化列表?
Note:I'm not using IB. I purely need a localized strings file with translated strings for a game.
注意:我没有使用 IB。我纯粹需要一个带有游戏翻译字符串的本地化字符串文件。
My workaround so far: I created the de.lproj folders manually, copied the strings file into de.lproj, added it to Xcode and Xcode did recognize the file as german. Xcode also added German to the Localization list. I'm wondering if there is an easier way to do this (from within Xcode) instead of copying & adding the files manually?
到目前为止我的解决方法:我手动创建了 de.lproj 文件夹,将字符串文件复制到 de.lproj,将其添加到 Xcode,Xcode 确实将该文件识别为德语。Xcode 还将德语添加到本地化列表中。我想知道是否有更简单的方法来做到这一点(从 Xcode 中)而不是手动复制和添加文件?
回答by Mark Szymczyk
Select your project from the project navigator to open the project editor. Select your project from the left side of the project editor. Click the Info button at the top of the editor. You should see a list of localizations along with a button to add a localization. Click the Add button and choose a language. A sheet will open that lets you choose what files to localize.
从项目导航器中选择您的项目以打开项目编辑器。从项目编辑器的左侧选择您的项目。单击编辑器顶部的信息按钮。您应该会看到一个本地化列表以及一个用于添加本地化的按钮。单击添加按钮并选择一种语言。将打开一个工作表,让您选择要本地化的文件。