IOS:将语言添加为 Localizable.strings
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18843899/
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
IOS: Add languages as Localizable.strings
提问by Chanuka
I want to localize my app, and I add French and Spanish to the target properties other than English
我想本地化我的应用程序,并将法语和西班牙语添加到英语以外的目标属性中
But, those languages are not showing inside the file inspector to select. Only 'English' and Something called 'Base'.
但是,这些语言没有显示在文件检查器中以供选择。只有“英语”和称为“基础”的东西。
Any Help?
任何帮助?
回答by Michael Dautermann
If you go to the "Info" pane of your project, you'll see a panel that shows your Deployment Target, Configurations and also the current localizations that you support (including a checkmark for "Use Base Internationalization"). Base Internationalization, b.t.w., allows you to have a single storyboard file that has different string files populating the string fields in the storyboard. It works for iOS 6 and newer.
如果您转到项目的“信息”窗格,您将看到一个面板,其中显示您的部署目标、配置以及您支持的当前本地化(包括“使用基础国际化”的复选标记)。 顺便说一句,Base Internationalization允许您拥有一个故事板文件,该文件具有填充故事板中字符串字段的不同字符串文件。它适用于 iOS 6 和更新版本。
When you start, it might look like this:
开始时,它可能如下所示:
Here I've added Hindi as a language possibility:
在这里,我添加了印地语作为一种语言可能性:
And when you're done, you have the checkbox to choose from:
完成后,您可以从复选框中进行选择:
回答by Jordan Montel
You need to add in your Info Project the localizations (I can't add image sorry).
您需要在您的信息项目中添加本地化(对不起,我无法添加图片)。
And next you need to create a new file in your project named "Localizable.strings" and Localize this file in your identity menu.
接下来,您需要在您的项目中创建一个名为“Localizable.strings”的新文件,并在您的身份菜单中本地化此文件。
++
++
回答by Manthan
Just click on your project in "Info" panel , where you can see "Localizations" and add the languages you want.
只需在“信息”面板中单击您的项目,您就可以在其中看到“本地化”并添加您想要的语言。