Xamarin.iOS NSLocationWhenUsageDescription的本地化

Xamarin.iOS NSLocationWhenUsageDescription的本地化,ios,localization,xamarin.ios,geolocation,Ios,Localization,Xamarin.ios,Geolocation,在Xamarin Studio中使用Info.plist中的UsageDescription时,是否有方法本地化n位置? 或者将完整的Info.plist本地化也是一个解决方案 我尝试了以下步骤,因为它看起来与 但这对我不起作用 以下是步骤: 在en.proj和de.proj中: 我添加了一个空文件InfoPlist.strings 在Info.plist中: 我已将“nslocationwhenusagedescription”的键设置为“nslocationwhenusagedescrip

在Xamarin Studio中使用
Info.plist
中的UsageDescription时,是否有方法本地化
n位置?
或者将完整的
Info.plist
本地化也是一个解决方案

我尝试了以下步骤,因为它看起来与 但这对我不起作用

以下是步骤:
en.proj
de.proj
中: 我添加了一个空文件
InfoPlist.strings


Info.plist中

我已将“
nslocationwhenusagedescription
”的键设置为“
nslocationwhenusagedescriptionmessage


InfoPlist.strings中

我在字符串文件中添加了“
nsLocationWhenUsageDescriptionMessage
”作为键,并在每个文件中添加了相应的转换,但它似乎不起作用->原始字符串“
nsLocationWhenUsageDescriptionMessage
”在向用户请求权限时显示。

我有类似的问题(只是我使用了“始终”而不是“WhenInUse”。以下是有效的方法:

在en.lproj和de.lproj中添加文件InfoPlist.strings。每个文件仅包含一行:

"NSLocationAlwaysUsageDescription" = "Your location needed, because...";
在Info.plist中,字符串不再重要,因为它将取自InfoPlist.string文件。Info.plist中的相关行如下所示:

<key>NSLocationAlwaysUsageDescription</key>
<string>No text needed here.</string>
NSLocationAlwaysUsageDescription
这里不需要文本。

可能您忘记了字符串文件中的分号?或者您的两个文件夹被命名为*.proj而不是*.lproj?

我们在不使用usagedescription
时遇到了类似的本地化问题。翻译在iOS模拟器上显示,但从未在实际设备上显示。在我们从uppe修复了CbundleLocations数组之后在Info.plist中将r case语言代码改为小写。已正确翻译所有语言的权限说明

不正确:

<key>CFBundleLocalizations</key>
<array>
    <string>EN</string>
    <string>DE</string>
    <string>BG</string>
    <string>PL</string>
    <string>FR</string>
    <string>CS</string>
</array>
CbundleLocalizations
EN
判定元件
背景
PL
FR
反恐精英
正确:

<key>CFBundleLocalizations</key>
<array>
    <string>en</string>
    <string>de</string>
    <string>bg</string>
    <string>pl</string>
    <string>fr</string>
    <string>cs</string>
</array>
CbundleLocalizations
EN
判定元件
背景
pl
fr
反恐精英

谢谢你的建议。我会在开始使用该应用程序的iOS8版本后立即尝试。目前我已停止使用iOS8版本,因为有很多iOS7设备,iOS7上不需要此字符串。在我的情况下,这似乎不起作用。当用户收到NSLOCATIONWHENUSAGEDESC提示时ription消息,显示Info.plist中的消息(在您的示例中,“此处不需要文本。”将显示)。我添加了以下文件:Resources\en.lproj\InfoPlist.strings(在我的示例中是fr.lproj),并测试了以下内容:“nsLocationWhenInUsageDescription”=“bbbb”;