【发布时间】:2016-10-05 18:07:32
【问题描述】:
我正在使用一种简单的方法为我返回地图位置,但我想只获取英文地址。
public static async Task<MapLocation> ResolveLocationForGeopoint(Geopoint geopoint)
{
MapLocationFinderResult result = await MapLocationFinder.FindLocationsAtAsync(geopoint);
if (result.Status == MapLocationFinderStatus.Success)
{
if (result.Locations.Count != 0)
// Check if the result is really valid
if (result.Locations[0].Address.Town != "")
return result.Locations[0];
}
return null;
}
我的问题是:当我的 windows 语言是俄语时,它返回 cirillic 字符。
我已尝试覆盖应用程序语言:
ApplicationLanguages.PrimaryLanguageOverride = "en";
但是好像不行……
我怎样才能从这个方法中得到本地化的字符串?
【问题讨论】:
-
可能城市名称或位置是西里尔字符,为什么要更改?
-
因为我使用的是匈牙利的地图,而且任何匈牙利城市名称中都没有西里尔字符。 :D 它只显示系统语言中的每个名称。