title: How to translate city names in different languages
body: <p>I have a mobile app (both iOS and Android) and I need to translate cities name in the language of the user. I can do the translation on mobile device or on my server (running php). </p>
  
  <p>As of now I managed to translate country names, here the java code that translate all possible countries in all possible languages:</p>
  
  <pre><code>import java.util.Locale;
  
  public class ListCountry {
  
  public static void main(String[] args) {
  
  ListCountry obj = new ListCountry();
  
  obj.getListOfCountries();
  
  }
  
  public void getListOfCountries() {
  
  String[] locales = Locale.getISOCountries();
  
  for (String countryCode : locales) {
  
      Locale obj = new Locale("", countryCode);
      String[] lingue = Locale.getISOLanguages();
  
      for (String languageCode : lingue) {
  
          System.out.println("Country Code = " + obj.getCountry() 
          + ", Country Name = " + obj.getDisplayCountry(new Locale(languageCode)) + ", language = " + (new Locale(languageCode)).getDisplayLanguage());
      }
   }
  
  }
  
  }
  </code></pre>
  
  <p>How can I do a similar thing but with city names? I know <a href="http://cldr.unicode.org/" rel="nofollow">CLDR</a> and <a href="http://site.icu-project.org/" rel="nofollow">ICU</a> but I really can't figure out how to do it (or if it's even possible). If there is a nice object oriented library out there it'll be better than parsing CLDR XMLs or other source.</p>
  
  <p>I prefer to do it locally (on my server or even on mobile app) instead of calling Google API, example:</p>
  
  <pre><code>http://maps.googleapis.com/maps/api/geocode/json?address=turin&amp;language=ES
  http://maps.googleapis.com/maps/api/geocode/json?address=turin&amp;language=IT
  http://maps.googleapis.com/maps/api/geocode/json?address=turin&amp;language=EN
  </code></pre>
  
  <p>(question is: I guess google DB of cities name is public, where is it? is it nicely wrapped in some user friendly cross-platform library?)</p>
  
  <p>Thanks for your help</p>