gpt4 book ai didi

xcode - iTunesConnect (OSX) 无法识别 CFBundleLocalizations 中的本地化内容

转载 作者:行者123 更新时间:2023-12-02 12:18:29 24 4
gpt4 key购买 nike

我在 Mac App Store 的 OSX 项目中添加了多个本地化版本,提交了应用程序,但仅识别了英语(本地化版本:( "English"),取自 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 文件夹。我所做的就是将本地化标识符包含在 plist 文件中的 CFBundleLocalizations 下。我不知道 iOS 和 OSX 应用程序在这方面是否存在本质上的不同。如果有人对此有任何评论,我很高兴知道为什么我在这里所做的实际上解决了问题。

关于xcode - iTunesConnect (OSX) 无法识别 CFBundleLocalizations 中的本地化内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13645645/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com