Creating hashmap/map from XML resources

后端 未结 6 1395
礼貌的吻别
礼貌的吻别 2020-12-02 09:56

I\'m making an application where a web service fetches (amongst other) a bunch of codes from a webservice (I.e BEL, FRA, SWE). During runtime I want to translate these codes

6条回答
  •  青春惊慌失措
    2020-12-02 10:23

    It might be late for you, but for anyone else interested. If your 3 digit country codes are valid ISO 3166-1 alpha-3 codes

    Locale locale = new Locale("", "SWE");
    String countryName = locale.getDisplayCountry();
    

    This gives full country name with correct language.

提交回复
热议问题