如何在 iPhone 应用程序中本地化捆绑显示名称? [英] How to localize bundle display name in iPhone app?

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

问题描述

如何本地化 iPhone 应用程序的捆绑显示名称?iPhone 主屏幕应用图标下显示的名称.我希望有一个可以多语言显示的二进制包.

How can I localize bundle display name of an iPhone app? The name displayed in iPhone main screen under app icon. I wish a single binary bundle package which will be displayed multilingually.

推荐答案

这里有一些说明:

  • 创建一个名为 InfoPlist.strings
  • 的新空文件
  • 打开导航器 (cmd-opt-0) 并选择第一个窗格
  • 点击加号进行本地化
  • Xcode (4.3) 有点搞笑,它取消了你的文件.将其放入本地化文件夹(在项目的原始文件夹中可能称为 en.lproj.在项目导航器中重新选择它.
  • 您的文件现在(可能)在本地化列表中有英文.点击加号按钮添加另一种语言.
  • Create a new empty file called InfoPlist.strings
  • Open up the Navigator (cmd-opt-0) and select the first pane
  • Click the plus for a localization
  • Xcode (4.3) goes a bit funny and deselects your file. It's placed it into a localization folder (probably called en.lproj in the item's original folder. Re-select it in the Project Navigator.
  • Your file now has (probably) English in the Localization list. Click the plus button to add another language.

通常最好将所有要本地化的项目放在同一个文件夹中,这样当它们本地化时,Xcode 不会创建一大堆 en.lprojja.lproj 文件遍布整个项目.称之为本地化资源".

It's generally good to start with all the items you want to localize in the same folder, that way when they get localized, Xcode doesn't create a whole bunch of en.lproj and ja.lproj files all over your project. Call it something like "Localized Resources".

您现在可以通过将本地化名称添加到每个文件中来本地化应用名称,如下所示(对于法语本地化文件):

You can localize the app name now by adding the localized name to each file like this (for the French localized file):

"CFBundleDisplayName" = "Bonjour";

这篇关于如何在 iPhone 应用程序中本地化捆绑显示名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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