如何在iPhone应用程序中本地化捆绑显示名称? [英] How to localize bundle display name in iPhone app?
问题描述
如何本地化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
。在Project Navigator中重新选择它。 - 你的文件现在在本地化列表中有(可能)英文。单击加号按钮添加另一种语言。
- 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.lproj
和 ja.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屋!