[英]Xcode shows limited language list in Info.plist Localizations settings
My project is created with Cordova and imported to Xcode 8.1. 我的项目使用Cordova创建并导入到Xcode 8.1。
I am attempting to localize the camera and photo roll permission reason values in Info.plist. 我正在尝试在Info.plist中本地化相机和照片胶卷许可的原因值。 The languages I am supporting are English and Swedish.
我支持的语言是英语和瑞典语。 I have a file called InfoPlist.strings, which has an English and a Swedish translation:
我有一个名为InfoPlist.strings的文件,该文件具有英语和瑞典语翻译:
InfoPlist.strings showing English and Swedish translation files InfoPlist.strings显示英语和瑞典语翻译文件
Some descriptions of the process for this also specify that I should add an entry to the Info.plist file called "Localizations", with the languages I want to support as entries. 对此过程的一些描述还指定了我应该将一个我想支持的语言作为条目添加到一个名为“ Localizations”的Info.plist文件中。 However, Xcode doesn't give Swedish an option when I attempt to do this:
但是,当我尝试执行此操作时,Xcode不会为瑞典语提供选项:
List of localization options showing a short list of possible languages 本地化选项列表,显示可能的语言的简短列表
Currently, the localization does not work. 当前,本地化不起作用。 The value presented to the user is in English regardless of the devices language settings:
不论设备语言设置如何,显示给用户的值都是英文:
How can I add Swedish to the list of supported localizations in the Info.plist file? 如何将瑞典语添加到Info.plist文件中受支持的本地化列表中? Is there anything else do I need to do to make sure these strings will localize correctly?
我还有什么需要做的,以确保这些字符串可以正确地本地化?
You can just edit the info.plist file with your favourite text editor: 您可以使用喜欢的文本编辑器来编辑info.plist文件:
<key>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>sv</string>
<string>es</string>
<string>fr</string>
</array>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.