问题描述
我有一个名为多摄像机监控器"的项目.我将"MainMenu.xib"文件本地化.这是Xcode的本地化nib文件中的菜单栏:
I have an project named "Multi-Camera Supervisor". I make the "MainMenu.xib" file localized. Here are the menu bar in localized nib file of Xcode:
英语的Xib文件:
Xib file for English:
日语的Xib文件:
Xib file for Japanese:
但是当我在Xcode中运行我的应用程序时,第一项不起作用.这是我的应用程序运行时的菜单栏:
But when I ran my application in Xcode, The first item doesn't work. Here are the menu bars when my application ran:
正在运行的英语菜单栏:
Running menu bar for English:
日语运行菜单栏
Running menu bar for Japanese
您可以看到该应用程序名称仍为多摄像机监控器",并且未定位.
同时,出现在Dock图标中的应用程序名称也未本地化.
我应该如何解决呢?如何不仅在主菜单中而且在Dock中本地化应用程序名称?
You can see that the application name was still "Multi-Camera Supervisor" and NOT LOCALIZED.
Meanwhile, the application name appeared in Dock icon was not localized either.
How should I solve this? How can I localize the application name not only in main menu but also in Dock?
推荐答案
请确保将布尔值YES
的LSHasLocalizedDisplayName
键添加到应用程序的Info.plist
.我认为必须使用该键才能确保菜单中使用了本地化的CFBundleDisplayName
和CFBundleName
值.
Make sure you add a LSHasLocalizedDisplayName
key with a boolean value of YES
to the app's Info.plist
. I believe that key is necessary to make sure the localized CFBundleDisplayName
and CFBundleName
values are used for the menu.
这篇关于Xcode:OS X中的应用程序名称不能本地化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!