Search code examples
mysqliso

MySQL table of languages spoken with their full printable name and ISO code


For example, Spanish is ES while German is DE and so on.

Does anyone know where I could find a MySQL table-dump of all of the languages available with their name and iso codes?

Here's a list to show you what I'm talking about: http://www.w3schools.com/tags/ref_language_codes.asp


Solution

  • It won't take you more than 2 minutes. I just did it!

    1. Open w3 schools page on firefox
    2. Select table contents. Then Edit -> Copy
    3. Paste on a text editor. I did on Gedit (Ubuntu) . In this step you already have a text file with tabs as separators (so, it is already a .csv file with tabs instead of commas). You can replace tabs (\t) with commas, if you feel more comfortable.
    4. Save the text file. You can name it 'iso639.csv'
    5. Import the contents on your mysql table.
    6. Have a break after the hard work! ;-)