如何使用设置中相应选定的语言更改 iPhone 应用程序中的所有字符串?

发布于 2024-09-16 16:47:25 字数 251 浏览 5 评论 0原文

我需要你的帮助,我需要在 iPhone 应用程序中显示所有文本、标签、字符串以及向用户显示的文本,并在 iPhone 设置中选择相应的语言。

例如,用户在 iPhone 语言设置中选择德语或法语,那么我的应用程序应该提供或查看该语言的详细信息。

我需要本地化示例代码,有没有简单的方法可以按照标准步骤将代码翻译为 iphone sdk 中的不同语言。

请帮助我,我希望我能从你那里得到有效的解决方案。

谢谢你, 马丹·莫汉。

I need help from you, I need to display all the text, labels , strings and what ever text is showing to user in the iphone application with respective selected language in settings of iphone.

for example user selects German or French in settings of iPhone language, then my application should provide or view the details in that language.

I need sample code for localization, Is there any simple way to follow the standard steps to translate the code to different languages in iphone sdk.

please healp me, I hope that I can get efficient solution on this from you.

Thank you,
Madan Mohan.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

傲娇萝莉攻 2024-09-23 16:47:45

我认为前面的链接很好地说明了如何在 iPhone 上进行 I18N,但如果您觉得需要更多信息,可以尝试这篇文章 http://blog.federicomestrone.com/2010/05/18/internationalise-your-iphone-apps-with- xcode/ 只是稍微更面向代码。

但要点始终是相同的 - 您必须将代码与文本资源分开,并使用 NSLocalizedString 宏或其变体加载所有文本(字符串)。

I think the previous link gives a pretty good idea of how to do I18N on the iPhone, but if you feel you need more info, you can try this article http://blog.federicomestrone.com/2010/05/18/internationalise-your-iphone-apps-with-xcode/ which is just slightly more code-orientated.

The point though is always the same - you have to separate code from text resources and load all your text (strings) with the NSLocalizedString macro, or a variant thereof.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文