xcode 本地化 - 向 localizable.strings 文件添加额外的语言

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12069175/
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 01:17:52  来源:igfitidea点击:

Localization - Add additional language to localizable.strings file

xcodelocalizationxcode4.4

提问by Brabbeldas

I have found this postabout how to add localization to an app. The answer is very extensive and very helpful.

我找到了 这篇关于如何向应用程序添加本地化的帖子。答案非常广泛,非常有帮助。

There is just one thing:

只有一件事:

When selecting the 'Localizable.strings' file I open the File Inspector and I click on the button 'Make localized..' within the Localization pane. In the pop-up I can select a language but there is actually only one language to select form; English. There are no other options. But OK, having the option English selected I click on the button 'Localize'.

选择“Localizable.strings”文件时,我打开文件检查器,然后单击“本地化”窗格中的“使本地化..”按钮。在弹出窗口中,我可以选择一种语言,但实际上只有一种语言可供选择;英语。没有其他选择。但是好的,选择英语选项后,我单击“本地化”按钮。

Now, in the file inspector, within the Localization pane I see the option English selected.

现在,在文件检查器中的本地化窗格中,我看到选择了英语选项。

My problem: I do not havea '+' button to add an additional language.

我的问题:我没有用于添加其他语言的“+”按钮。

Doe anybody know what is causing this? How can I add an additional language? I am using Xcode 4.4.

有人知道是什么原因造成的吗?如何添加其他语言?我正在使用 Xcode 4.4。

回答by Martin R

You have to add the localization first in the "Localization" section of the "Info" tab for the project. Once added to the project, the new localization is available for the strings file.

您必须首先在项目的“信息”选项卡的“本地化”部分中添加本地化。添加到项目后,新的本地化可用于字符串文件。