GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Exporting Country List with Foreign Languages  XML
Forum Index -> General
Author Message

I'm trying to pull up a list of countries with English as the default language for the name of the country and select languages ie: EN, DE, FR, ES, JA, ZH, RU, HE, SV, BG, PT, FI, KO. If the country isn't translated in any of the above selected languages then DB would return empty string or NULL and finally in the last column it would output the postal code style format and if none then NULL or an empty string.

Then after this if possible a way to get an output of ADM1 for a selected country in that country's main language.

I have been successfull in doing the above using the HTML search but not with the XML search and with the countries I can't select which languages to display in the HTML search.

The purpose of this is to store in a MySQL database to be dynamically pulled by PHP for Java-Script drop down menu.

First user selects Country (Displayed in their native language) then if the country has ADM1 specified then that Drop Down gets populated. Based on the country the Postal Code would either be grayed out or available and the input limit would be specified.

Sorry for the long and drawn out explanation. I'm hoping to grab just the data I need and host data on the server localy. Of course I'll be giving full credit to GeoNames.

Joined: 08/12/2005 07:39:47
Messages: 4271


I am not sure whether I understand you correctly.

You can download the geonames database from here

In the file you find the names of the toponyms in all languages.

If you only want the country names in some languages you can use the xml format :

or you can use the csv output .

Just add the language you desire after the lang parameter.

I hope this answers your question.


Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team