如何使Cocoa明白我的iPhone应用程序不是英语? [英] How to make Cocoa understand that my iPhone app isn't in English?

查看:175
本文介绍了如何使Cocoa明白我的iPhone应用程序不是英语?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在纯粹是瑞典语的iPhone应用程式上工作,绝不会将其本地化为任何其他语言。应用程序中的所有字符串都是瑞典语,因此我们甚至没有 Localizable.strings

I work on an iPhone app that is purely in Swedish and it will never be localized to any other languages. All the strings in the app is in Swedish, so we don't even have Localizable.strings.

问题是Cocoa生成的字符串(如Done和Edit)是英语。我已经尝试将 Info.plist 中的本地化本地开发区域设置为瑞典语,但什么都没有改变。告诉Cocoa我的应用程序是在瑞典语,但显然是这样。

The problem is that the strings generated by Cocoa (such as Done and Edit) are in English. I've tried setting Localization native development region in the Info.plist to Swedish, but that changed nothing. It shouldn't be harder than that to tell Cocoa that my app is in Swedish, but obviously it is.

我也试过一堆其他东西没有任何运气。

I've also tried a bunch of other stuff without any luck. So what do I need to do to make Cocoa localize its strings to Swedish?

推荐答案

Cocoa生成的字符串(例如Done和编辑)是英语,因为您的iPhone语言设置设置为英语(在设置 - >常规 - >国际 - >语言)。如果您将语言设置设置为瑞典语,您应该可以看到瑞典文本。

The strings generated by Cocoa (such as Done and Edit) are in English because your iPhone language settings are set to English (in Settings -> General -> International -> Language ). If you set the language settings to Swedish you should see the texts in Swedish.

这是iPhone默认情况下如何工作,如果您要更改某些按钮的文本强制他们到瑞典语,你将不得不创建他们的出口并手动更改文本。例如像这样的UIBarButtonItem(默认文本为Done(英文)):

This is how the iPhone works by default, if you want to change the texts of some buttons to force them to Swedish you will have to create an outlet of them and change the text manually. For example like this UIBarButtonItem (with a default text Done (in english)):

UIBarButtonItem *doneButton = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(doneContact)] autorelease];
doneButton.title =@"Whatever";
self.navigationItem.rightBarButtonItem = doneButton;

我希望这可以帮助你...

I hope that this may help you...

这篇关于如何使Cocoa明白我的iPhone应用程序不是英语?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆