UPDATE translations SET locale='gr' WHERE locale='gr ';

UPDATE translations SET locale='BG' WHERE locale='bg';
UPDATE translations SET locale='DE' WHERE locale='de';
UPDATE translations SET locale='ES' WHERE locale='es';
UPDATE translations SET locale='EL' WHERE locale='gr';
UPDATE translations SET locale='FR' WHERE locale='fr';
UPDATE translations SET locale='IT' WHERE locale='it';
UPDATE translations SET locale='NL' WHERE locale='nl';
UPDATE translations SET locale='PT' WHERE locale='pt';

CREATE TABLE iso_codes
(
 iso_code varchar,
 language varchar
) WITH OIDS;

#http://www.w3.org/WAI/ER/IG/ert/iso639.htm

INSERT INTO iso_codes VALUES ('AA', 'Afar');
INSERT INTO iso_codes VALUES ('AB', 'Abkhazian');
INSERT INTO iso_codes VALUES ('AF', 'Afrikaans');
INSERT INTO iso_codes VALUES ('AM', 'Amharic');
INSERT INTO iso_codes VALUES ('AR', 'Arabic');
INSERT INTO iso_codes VALUES ('AS', 'Assamese');
INSERT INTO iso_codes VALUES ('AY', 'Aymara');
INSERT INTO iso_codes VALUES ('AZ', 'Azerbaijani');
INSERT INTO iso_codes VALUES ('BA', 'Bashkir');
INSERT INTO iso_codes VALUES ('BE', 'Byelorussian');
INSERT INTO iso_codes VALUES ('BG', 'Bulgarian');
INSERT INTO iso_codes VALUES ('BH', 'Bihari');
INSERT INTO iso_codes VALUES ('BI', 'Bislama');
INSERT INTO iso_codes VALUES ('BN', 'Bengali');
INSERT INTO iso_codes VALUES ('BO', 'Tibetan');
INSERT INTO iso_codes VALUES ('BR', 'Breton');
INSERT INTO iso_codes VALUES ('CA', 'Catalan');
INSERT INTO iso_codes VALUES ('CO', 'Corsican');
INSERT INTO iso_codes VALUES ('CS', 'Czech');
INSERT INTO iso_codes VALUES ('CY', 'Welsh');
INSERT INTO iso_codes VALUES ('DA', 'Danish');
INSERT INTO iso_codes VALUES ('DE', 'German');
INSERT INTO iso_codes VALUES ('DZ', 'Bhutani');
INSERT INTO iso_codes VALUES ('EL', 'Greek');
INSERT INTO iso_codes VALUES ('EN', 'English');
INSERT INTO iso_codes VALUES ('EO', 'Esperanto');
INSERT INTO iso_codes VALUES ('ES', 'Spanish');
INSERT INTO iso_codes VALUES ('ET', 'Estonian');
INSERT INTO iso_codes VALUES ('EU', 'Basque');
INSERT INTO iso_codes VALUES ('FA', 'Persian');
INSERT INTO iso_codes VALUES ('FI', 'Finnish');
INSERT INTO iso_codes VALUES ('FJ', 'Fiji');
INSERT INTO iso_codes VALUES ('FO', 'Faeroese');
INSERT INTO iso_codes VALUES ('FR', 'French');
INSERT INTO iso_codes VALUES ('FY', 'Frisian');
INSERT INTO iso_codes VALUES ('GA', 'Irish');
INSERT INTO iso_codes VALUES ('GD', 'Gaelic');
INSERT INTO iso_codes VALUES ('GL', 'Galician');
INSERT INTO iso_codes VALUES ('GN', 'Guarani');
INSERT INTO iso_codes VALUES ('GU', 'Gujarati');
INSERT INTO iso_codes VALUES ('HA', 'Hausa');
INSERT INTO iso_codes VALUES ('HI', 'Hindi');
INSERT INTO iso_codes VALUES ('HR', 'Croatian');
INSERT INTO iso_codes VALUES ('HU', 'Hungarian');
INSERT INTO iso_codes VALUES ('HY', 'Armenian');
INSERT INTO iso_codes VALUES ('IA', 'Interlingua');
INSERT INTO iso_codes VALUES ('IE', 'Interlingue');
INSERT INTO iso_codes VALUES ('IK', 'Inupiak');
INSERT INTO iso_codes VALUES ('IN', 'Indonesian');
INSERT INTO iso_codes VALUES ('IS', 'Icelandic');
INSERT INTO iso_codes VALUES ('IT', 'Italian');
INSERT INTO iso_codes VALUES ('IW', 'Hebrew');
INSERT INTO iso_codes VALUES ('JA', 'Japanese');
INSERT INTO iso_codes VALUES ('JI', 'Yiddish');
INSERT INTO iso_codes VALUES ('JW', 'Javanese');
INSERT INTO iso_codes VALUES ('KA', 'Georgian');
INSERT INTO iso_codes VALUES ('KK', 'Kazakh');
INSERT INTO iso_codes VALUES ('KL', 'Greenlandic');
INSERT INTO iso_codes VALUES ('KM', 'Cambodian');
INSERT INTO iso_codes VALUES ('KN', 'Kannada');
INSERT INTO iso_codes VALUES ('KO', 'Korean');
INSERT INTO iso_codes VALUES ('KS', 'Kashmiri');
INSERT INTO iso_codes VALUES ('KU', 'Kurdish');
INSERT INTO iso_codes VALUES ('KY', 'Kirghiz');
INSERT INTO iso_codes VALUES ('LA', 'Latin');
INSERT INTO iso_codes VALUES ('LN', 'Lingala');
INSERT INTO iso_codes VALUES ('LO', 'Laothian');
INSERT INTO iso_codes VALUES ('LT', 'Lithuanian');
INSERT INTO iso_codes VALUES ('LV', 'Latvian');
INSERT INTO iso_codes VALUES ('MG', 'Malagasy');
INSERT INTO iso_codes VALUES ('MI', 'Maori');
INSERT INTO iso_codes VALUES ('MK', 'Macedonian');
INSERT INTO iso_codes VALUES ('ML', 'Malayalam');
INSERT INTO iso_codes VALUES ('MN', 'Mongolian');
INSERT INTO iso_codes VALUES ('MO', 'Moldavian');
INSERT INTO iso_codes VALUES ('MR', 'Marathi');
INSERT INTO iso_codes VALUES ('MS', 'Malay');
INSERT INTO iso_codes VALUES ('MT', 'Maltese');
INSERT INTO iso_codes VALUES ('MY', 'Burmese');
INSERT INTO iso_codes VALUES ('NA', 'Nauru');
INSERT INTO iso_codes VALUES ('NE', 'Nepali');
INSERT INTO iso_codes VALUES ('NL', 'Dutch');
INSERT INTO iso_codes VALUES ('NO', 'Norwegian');
INSERT INTO iso_codes VALUES ('OC', 'Occitan');
INSERT INTO iso_codes VALUES ('OM', 'Oromo');
INSERT INTO iso_codes VALUES ('OR', 'Oriya');
INSERT INTO iso_codes VALUES ('PA', 'Punjabi');
INSERT INTO iso_codes VALUES ('PL', 'Polish');
INSERT INTO iso_codes VALUES ('PS', 'Pashto');
INSERT INTO iso_codes VALUES ('PT', 'Portuguese');
INSERT INTO iso_codes VALUES ('QU', 'Quechua');
INSERT INTO iso_codes VALUES ('RM', 'Rhaeto-Romance');
INSERT INTO iso_codes VALUES ('RN', 'Kirundi');
INSERT INTO iso_codes VALUES ('RO', 'Romanian');
INSERT INTO iso_codes VALUES ('RU', 'Russian');
INSERT INTO iso_codes VALUES ('RW', 'Kinyarwanda');
INSERT INTO iso_codes VALUES ('SA', 'Sanskrit');
INSERT INTO iso_codes VALUES ('SD', 'Sindhi');
INSERT INTO iso_codes VALUES ('SG', 'Sangro');
INSERT INTO iso_codes VALUES ('SH', 'Serbo-Croatian');
INSERT INTO iso_codes VALUES ('SI', 'Singhalese');
INSERT INTO iso_codes VALUES ('SK', 'Slovak');
INSERT INTO iso_codes VALUES ('SL', 'Slovenian');
INSERT INTO iso_codes VALUES ('SM', 'Samoan');
INSERT INTO iso_codes VALUES ('SN', 'Shona');
INSERT INTO iso_codes VALUES ('SO', 'Somali');
INSERT INTO iso_codes VALUES ('SQ', 'Albanian');
INSERT INTO iso_codes VALUES ('SR', 'Serbian');
INSERT INTO iso_codes VALUES ('SS', 'Siswati');
INSERT INTO iso_codes VALUES ('ST', 'Sesotho');
INSERT INTO iso_codes VALUES ('SU', 'Sudanese');
INSERT INTO iso_codes VALUES ('SV', 'Swedish');
INSERT INTO iso_codes VALUES ('SW', 'Swahili');
INSERT INTO iso_codes VALUES ('TA', 'Tamil');
INSERT INTO iso_codes VALUES ('TE', 'Tegulu');
INSERT INTO iso_codes VALUES ('TG', 'Tajik');
INSERT INTO iso_codes VALUES ('TH', 'Thai');
INSERT INTO iso_codes VALUES ('TI', 'Tigrinya');
INSERT INTO iso_codes VALUES ('TK', 'Turkmen');
INSERT INTO iso_codes VALUES ('TL', 'Tagalog');
INSERT INTO iso_codes VALUES ('TN', 'Setswana');
INSERT INTO iso_codes VALUES ('TO', 'Tonga');
INSERT INTO iso_codes VALUES ('TR', 'Turkish');
INSERT INTO iso_codes VALUES ('TS', 'Tsonga');
INSERT INTO iso_codes VALUES ('TT', 'Tatar');
INSERT INTO iso_codes VALUES ('TW', 'Twi');
INSERT INTO iso_codes VALUES ('UK', 'Ukrainian');
INSERT INTO iso_codes VALUES ('UR', 'Urdu');
INSERT INTO iso_codes VALUES ('UZ', 'Uzbek');
INSERT INTO iso_codes VALUES ('VI', 'Vietnamese');
INSERT INTO iso_codes VALUES ('VO', 'Volapuk');
INSERT INTO iso_codes VALUES ('WO', 'Wolof');
INSERT INTO iso_codes VALUES ('XH', 'Xhosa');
INSERT INTO iso_codes VALUES ('YO', 'Yoruba');
INSERT INTO iso_codes VALUES ('ZH', 'Chinese');
INSERT INTO iso_codes VALUES ('ZU', 'Zulu');
