gpt4 book ai didi

iphone - 在 iPhone 应用程序中使用 Localized.strings

转载 作者:行者123 更新时间:2023-12-03 18:39:08 25 4
gpt4 key购买 nike

我下载了 Three20 库:

http://three20.info/

我打开了这个库附带的 TTCatalog 示例项目:

http://img16.imageshack.us/img16/3183/screenshot20100302at752.png

正如您所看到的,有很多 Localized.strings 文件。

当我打开 iPhone 模拟器并在设置中将其语言更改为法语时,按钮上的文本仍然保留为英语:

http://img69.imageshack.us/img69/9775/screenshot20100302at812.png

我已经检查过,在法语的 Localization.strings 中肯定有文本“See All”的对应条目。

为什么要使用 Localized.strings 文件以及需要采取哪些步骤?

(此示例项目不附带任何 nib/xib 文件)

编辑:

在 Info.plist 中添加以下 XML 后:

...
<dict>
...
<key>CFBundleLocalizations</key>
<array>
<string>de</string>
<string>en</string>
<string>es</string>
<string>fr</string>
<string>it</string>
<string>ja</string>
<string>zh_cn</string>
<string>zh_tw</string>
</array>
</dict>
...

现在可以了!

最佳答案

这个帖子有帮助吗http://groups.google.com/group/three20/browse_thread/thread/bee3d5525a32d476

引用的文本,以防链接不可用:

For localizations inside bundles to work, your app has to have some localized resources itself, because the available localizations are determined by looking at the once available in the main bundle. Alternatively, you can add the available localizations as a setting in your Info.plist, with the key 'CFBundleLocalizations'. Note that the value of this key has to be an array, something the Info.plist editor of XCode does not support, you edit the file 'by hand' to get the localizations in there. If you only need one localization, you can simple set the key 'CFBundleDevelopmentRegion' to the value of your choice.

关于iphone - 在 iPhone 应用程序中使用 Localized.strings,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2363017/

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