1

I'm using a simple method that returns map location for me, but I would like to get that address in english only.

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;
}

My problem is: When my windows language is russian it returns cirillic characters.

I have tried to override the application language:

ApplicationLanguages.PrimaryLanguageOverride = "en";

But it seems it doesn't works...

How could i get the localized string from this method?

S. Matthews
  • 355
  • 2
  • 9
tixovoxi
  • 171
  • 4
  • 11
  • Maybe the name of the city or the location is in Cyrillic characters, why do you want to change it? – Afzaal Ahmad Zeeshan Oct 05 '16 at 18:10
  • Becouse I use the map in Hungary and there are no Cyrillic characters in any hungarian city name. :D It just display every name in the system language. – tixovoxi Oct 05 '16 at 18:13

1 Answers1

1

MapLocationFinder.FindLocationsAtAsync method does not provide a mechanism to specify the language used in the returned address now. It always automatically uses the Windows display language. And in most cases, the Street and Town are localized to its local culture. For example, if you request a location in France, the street names are localized in French.

As a workaround, we can use Bing Maps REST Services which provides REST APIs that can specify Culture Parameter. For FindLocationsAtAsync method, we can use Find a Location by Point like following:

http://dev.virtualearth.net/REST/v1/Locations/47.64054,-122.12934?c=en-US&key=BingMapsKey

Also, you are welcome to submit a feature request on WPDev User Voice to ask for this feature.

Jay Zuo
  • 15,653
  • 2
  • 25
  • 49