English instead of local language for Geocoder

前端 未结 3 1699
迷失自我
迷失自我 2021-01-05 14:47

I am using Geocoder to get address from lan/lat coordinates. The problem is that the address is in local language (the street name usually). How can I set it to be only in E

3条回答
  •  执笔经年
    2021-01-05 15:26

    create a new locate instance like this:

        Locale aLocale = new Builder().setLanguage("en").setScript("Latn").setRegion("RS").build();
        Geocoder geocoder = new Geocoder(context,aLocale);
    

    https://developer.android.com/reference/java/util/Locale.Builder.html

提交回复
热议问题