Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/219.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android GPS:返回国家名称,但未翻译_Android_Gps - Fatal编程技术网

Android GPS:返回国家名称,但未翻译

Android GPS:返回国家名称,但未翻译,android,gps,Android,Gps,在我的功能中,我正在读取用户位置的数据: public async void OnLocationChanged(Location location) { _currentLocation = location; Address address = await ReverseGeocodeCurrentLocation(); Account.Instance.Locality = address.Locality;

在我的功能中,我正在读取用户位置的数据:

    public async void OnLocationChanged(Location location)
    {
        _currentLocation = location;
        Address address = await ReverseGeocodeCurrentLocation();

        Account.Instance.Locality = address.Locality;
        Account.Instance.Country = address.CountryName;
        Account.Instance.CountryCode = address.CountryCode;
    }
但是地址和所有东西都是用德语寄回来的,因为我住在德国。但我需要的是英语。有没有比进行210字符串比较更好的方法

谢谢:)


请参阅。

您能给我看看您的
反向存储当前位置的方法吗?如果您正在使用
Geocode
请尝试此
Geocoder-Geocoder=new-Geocoder(Context,Locale.ENGLISH)精彩。这就成功了!
Geocoder geocoder = new Geocoder(Context, Locale.ENGLISH);