xcode – iTunesConnect(OSX)无法识别CFBundleLocalizations中的本地化

前端之家收集整理的这篇文章主要介绍了xcode – iTunesConnect(OSX)无法识别CFBundleLocalizations中的本地化前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在Mac App Store的OSX项目中添加了几个本地化,提交了应用程序,但只识别了英语(本地化:(“英语”),取自ITC Binary Details).该产品在iTunes上运行,其中英语是唯一显示的语言.

使用自定义系统处理本地化字符串,因此我们不需要像English.lproj这样的额外文件夹.为了本地化应用程序,我刚刚在项目的Info.plist中添加了所有语言标识符,在CFBundleLocalizations的关键字下,Apple建议在https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPInternational/Articles/ChoosingLocalizations.html

An application can notify the system that it supports additional localizations through its information property list (Info.plist) file. To specify localizations not included in your bundle’s .lproj directories,add the CFBundleLocalizations key to this file. The value for the key is an array of strings,each of which contains an ISO language designator as described in “Language and Locale Designations.”

plist文件中指定本地化的部分是:

<key>CFBundleLocalizations</key>
<array>
    <string>en</string>
    <string>de</string>
    <string>fr</string>
    <string>it</string>
    <string>es</string>
    <string>pt</string>
    <string>nl</string>
    <string>se</string>
</array>

我过去在2个iOS应用程序上使用了完全相同的方法,并且它们都运行良好.我不明白为什么这次我们得到了不同的行为.有什么想法吗?

谢谢.

解决方法

我终于明白了.

在我的问题中,我曾说过:

The localized strings are handled using a custom system,so we do not need extra folders like English.lproj.

事实证明,这正是我解决这个问题的方法.我去了项目> “信息”选项卡,在“本地化”下,为应用支持的每种语言添加一个条目.这为每个创建了一个文件夹,例如es.lproj,fr.lproj等我提交了应用程序,在iTunesConnect中我看到了本地化被识别出来:

Localizations : ( “de”,“English”,“es”,“fr”,“it”,“nl”,“pt”,“sv” )

更新还没有结束,但我相信它会没问题.

我仔细检查了一个旧的iOS应用程序,其中包含3个本地化版本,这些版本已被正确识别.在那个应用程序中,我没有使用上述过程创建任何额外的.lproj文件夹.我所做的就是在CFBundleLocalizations下的plist文件中包含本地化标识符.我不知道在这方面iOS和OSX应用程序之间是否存在某种本质上不同的东西.如果有人对此有任何意见,我很高兴知道为什么我在这里做的事实际上解决了这个问题.

猜你在找的Xcode相关文章