Xcode 本地化设置中没有加号或减号按钮

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

No plus or minus button in Xcode localization settings

iosxcodebuttonlocalization

提问by CGee

I need to translate an iOS-Application within two days, but my XCode versions (4.4 and 4.5 Developer Preview) both don't give me the option to add another language. I only get the option to click "Make localized.." but I can only choose english and after choosing it, there are no plus and minus buttons in the utility inspector in Xcode - with no file or project i tried.

我需要在两天内翻译一个 iOS 应用程序,但我的 XCode 版本(4.4 和 4.5 开发人员预览版)都没有给我添加另一种语言的选项。我只能选择单击“使本地化..”,但我只能选择英语,选择它后,Xcode 的实用程序检查器中没有加号和减号按钮 - 我没有尝试过任何文件或项目。

Am I missing something here?

我在这里错过了什么吗?

Edit:This is how it looks like:

编辑:这是它的样子:

enter image description here

在此处输入图片说明

回答by Carina

It moved to the starting in Xcode 4.4 .

它从 Xcode 4.4 开始。

enter image description here

在此处输入图片说明

回答by Nyon

I just meet with this problem and I was using xcode 4.5 preview 3. Couldn't believe apple have made this kind of mistakes and not fixed it even when its at preview 3. Therefore I believe they just have changed the way localisation work so I poke around the UI until I finally found it.

我刚遇到这个问题,我使用的是 xcode 4.5 预览版 3。不敢相信苹果犯了这种错误,即使在预览版 3 时也没有修复它。因此我相信他们只是改变了本地化的工作方式,所以我在 UI 中四处探索,直到我终于找到它。

They have shifted it. You first have to add the language you want to the project first. Then after it will appear as a check box item in the UI you show. To add the language you need to click go to Project-> Infothen click "+"to add new localizations.

他们已经转移了它。您首先必须先将您想要的语言添加到项目中。然后它将在您显示的 UI 中显示为复选框项。要添加您需要的语言,请单击转到“项目”->“信息”,然后单击“+”以添加新的本地化。

Hopes that helps.

希望有所帮助。

回答by BiGGA

It seems Xcode 4.5 DP3 completely miss the +/- buttons in the localization pane. I tried Nyon solution to add an additional language (actually before seeing this post). Doing so, I can add a language into the project but I cannot use that new language to localize my files. But thanks to him, I know now that it is the issue with Xcode DP3.

Xcode 4.5 DP3 似乎完全错过了本地化窗格中的 +/- 按钮。我尝试了 Nyon 解决方案来添加额外的语言(实际上是在看到这篇文章之前)。这样做,我可以在项目中添加一种语言,但我不能使用这种新语言来本地化我的文件。但多亏了他,我现在知道这是 Xcode DP3 的问题。

So, what did was very simple: I use the old Xcode 4.3 to localize my file(with + button in the localization pane). Then, I have two versions of the files (one for each language, nicely organized into appropriate lproj). Then I switch back to Xcode 4.5 DP3. Now, both languages (en and the new one) appear in the localization pane. And this time, for all my files!

所以,所做的非常简单:我使用旧的 Xcode 4.3 来本地化我的文件(在本地化窗格中使用 + 按钮)。然后,我有两个版本的文件(每种语言一个,很好地组织成适当的 lproj)。然后我切换回 Xcode 4.5 DP3。现在,两种语言(en 和新的)都出现在本地化窗格中。而这一次,对于我所有的文件!

That is, you have to add a language only once in Xcode 4.3, afterwards, the new language will appear in your language list as it should be.

也就是说,您只需在 Xcode 4.3 中添加一次语言,之后,新语言将按原样出现在您的语言列表中。

回答by Kevin Grant

The buttons scroll out of view when the "+" is used to extend the list. Use the mouse to grab the bar right below the list of localizations and drag it down to make more room, and the buttons will be visible again. Then you can click on the "+" to see a menu of additional localizations.

当“+”用于扩展列表时,按钮会滚动出视图。使用鼠标抓住本地化列表正下方的栏并将其向下拖动以腾出更多空间,按钮将再次可见。然后您可以单击“+”以查看其他本地化的菜单。

回答by Kemo

enter image description here

在此处输入图片说明

You can add languages in Xcode 4.5 like above.

您可以像上面一样在 Xcode 4.5 中添加语言。

回答by carlos_ms

I think the answer is not complete!... If you start a project for a non English, Japanese, French or German language (in xCode 4.6), then you will be a bit lost on how to localize your resources.

我认为答案是不完整的!...如果您为非英语、日语、法语或德语(在 xCode 4.6 中)开始一个项目,那么您将在如何本地化您的资源方面有点迷失。

If you just go and try to add a new language as stated by kamesh above, you'll find you can't if you didn't FIRST localized at least one of your resources in the default provided languages by xcode.

如果您只是尝试添加上面 kamesh 所述的新语言,您会发现如果您没有首先使用 xcode 以默认提供的语言本地化至少一个资源,您将无法做到。

So, localize at least one of your resources needed to be localized, and then, add the language you need to add as kamesh, then the next modal presented by xcode will let you add any resources to that new language. (not very intuitive and definitely not documented by apple.)

因此,至少本地化一个需要本地化的资源,然后将需要添加的语言添加为 kamesh,然后 xcode 提供的下一个模式将让您向该新语言添加任何资源。(不是很直观,苹果绝对没有记录。)