如何本地化不同语言的iPhone应用程序? [英] How to localize an iphone app for different languages?

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

问题描述

有谁能解释我如何本地化iPhone应用程序?我对XCode本地化概念感到困惑。

Can anyone explain me how to localize an iPhone app ? I am getting confused with the XCode localization concept.

推荐答案

首先,您可以在项目设置中定义要管理的语言。这不是必需的工作,但从那里开始是很棒的。

First you may define in your project settings the languages you want to manage. That's not a needed work but it's great to start there.

然后,对于你想要本地化的每个XIB,点击它,转到属性面板并添加通缉语言。然后将唯一的XIB文件分派到许多文件中,每种语言对应一个文件。然后根据需要调整每一个。

Then for each of your XIB you want to localize, click on it, go to the property panel and add wanted languages. The unique XIB file will be then dispatched into many files, one for each language. Then just adapt each one as wanted.

这与图像,声音或任何资源的处理方式相同。

It's the same way of doing for images, sounds, or any resource.

对于你可能在你的代码中写的字符串,在你的项目中添加一个Localizable.strings文件并添加一些键,如:

For the Strings you may have writen in your code, add a "Localizable.strings" file into your project and add into it some keys like :

"Goodbye_Code" = "Adiós"

并在您的代码中,写了再见,替换为:

and in your code, where you had writen @"Goodbye", replace by :

NSLocalizedString(@"Goodbye_Code", @"Some description : I'm saying goodye to the user that is leaving the app");

最后,请记住您的应用可能具有默认语言设置。如果未创建本地化,则将使用与该默认语言对应的本地化。

In the end, remember that your app may have a default language setting. If a localization is not created, the one that correspond to that default language will be used in place.

您可以查看这些链接以获取更多信息:

You can check those links for further information :

http: //www.raywenderlich.com/2876/how-to-localize-an-iphone-app-tutorial

http://www.icanlocalize.com/site/tutorials/iphone-applications-localization-guide/

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

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