Skip to content

Instantly share code, notes, and snippets.

@podhy
Last active April 14, 2016 12:55
Show Gist options
  • Save podhy/12b4d027e579313f7f612f49f0c76b3f to your computer and use it in GitHub Desktop.
Save podhy/12b4d027e579313f7f612f49f0c76b3f to your computer and use it in GitHub Desktop.
České překlady zemí do Prestashopu (data vytažena z číselníku zemí na ČSÚ). Soubor stačí spustit nad databází. Je potřeba mít v tabulce ps_lang češtinu.
create temporary table _zeme (id varchar(255) primary key, popis varchar(255));
insert into _zeme values ('AF', trim('Afghánistán '));
insert into _zeme values ('AX', trim('Alandy '));
insert into _zeme values ('AL', trim('Albánie '));
insert into _zeme values ('DZ', trim('Alžírsko '));
insert into _zeme values ('AS', trim('Americká Samoa '));
insert into _zeme values ('VI', trim('Americké Panenské ostrovy '));
insert into _zeme values ('AD', trim('Andorra '));
insert into _zeme values ('AO', trim('Angola '));
insert into _zeme values ('AI', trim('Anguilla '));
insert into _zeme values ('AQ', trim('Antarktida '));
insert into _zeme values ('AG', trim('Antigua a Barbuda '));
insert into _zeme values ('AR', trim('Argentina '));
insert into _zeme values ('AM', trim('Arménie '));
insert into _zeme values ('AW', trim('Aruba '));
insert into _zeme values ('AU', trim('Austrálie '));
insert into _zeme values ('AZ', trim('Ázerbájdžán '));
insert into _zeme values ('BS', trim('Bahamy '));
insert into _zeme values ('BH', trim('Bahrajn '));
insert into _zeme values ('BD', trim('Bangladéš '));
insert into _zeme values ('BB', trim('Barbados '));
insert into _zeme values ('BE', trim('Belgie '));
insert into _zeme values ('BZ', trim('Belize '));
insert into _zeme values ('BY', trim('Bělorusko '));
insert into _zeme values ('BJ', trim('Benin '));
insert into _zeme values ('BM', trim('Bermudy '));
insert into _zeme values ('BT', trim('Bhútán '));
insert into _zeme values ('BO', trim('Bolívie '));
insert into _zeme values ('BQ', trim('Bonaire, Svatý Eustach a Saba '));
insert into _zeme values ('BA', trim('Bosna a Hercegovina '));
insert into _zeme values ('BW', trim('Botswana '));
insert into _zeme values ('BV', trim('Bouvetův ostrov '));
insert into _zeme values ('BR', trim('Brazílie '));
insert into _zeme values ('IO', trim('Britské indickooceánské území '));
insert into _zeme values ('VG', trim('Britské Panenské ostrovy '));
insert into _zeme values ('BN', trim('Brunej '));
insert into _zeme values ('BG', trim('Bulharsko '));
insert into _zeme values ('BF', trim('Burkina Faso '));
insert into _zeme values ('BI', trim('Burundi '));
insert into _zeme values ('CK', trim('Cookovy ostrovy '));
insert into _zeme values ('CW', trim('Curaçao '));
insert into _zeme values ('TD', trim('Čad '));
insert into _zeme values ('ME', trim('Černá Hora '));
insert into _zeme values ('CZ', trim('Česko '));
insert into _zeme values ('CN', trim('Čína '));
insert into _zeme values ('DK', trim('Dánsko '));
insert into _zeme values ('CD', trim('Demokratická republika Kongo '));
insert into _zeme values ('DM', trim('Dominika '));
insert into _zeme values ('DO', trim('Dominikánská republika '));
insert into _zeme values ('DJ', trim('Džibutsko '));
insert into _zeme values ('EG', trim('Egypt '));
insert into _zeme values ('EC', trim('Ekvádor '));
insert into _zeme values ('ER', trim('Eritrea '));
insert into _zeme values ('EE', trim('Estonsko '));
insert into _zeme values ('ET', trim('Etiopie '));
insert into _zeme values ('FO', trim('Faerské ostrovy '));
insert into _zeme values ('FK', trim('Falklandy '));
insert into _zeme values ('FJ', trim('Fidži '));
insert into _zeme values ('PH', trim('Filipíny '));
insert into _zeme values ('FI', trim('Finsko '));
insert into _zeme values ('FR', trim('Francie '));
insert into _zeme values ('GF', trim('Francouzská Guyana '));
insert into _zeme values ('TF', trim('Francouzská jižní a antarktická území '));
insert into _zeme values ('PF', trim('Francouzská Polynésie '));
insert into _zeme values ('GA', trim('Gabon '));
insert into _zeme values ('GM', trim('Gambie '));
insert into _zeme values ('GH', trim('Ghana '));
insert into _zeme values ('GI', trim('Gibraltar '));
insert into _zeme values ('GD', trim('Grenada '));
insert into _zeme values ('GL', trim('Grónsko '));
insert into _zeme values ('GE', trim('Gruzie '));
insert into _zeme values ('GP', trim('Guadeloupe '));
insert into _zeme values ('GU', trim('Guam '));
insert into _zeme values ('GT', trim('Guatemala '));
insert into _zeme values ('GG', trim('Guernsey '));
insert into _zeme values ('GN', trim('Guinea '));
insert into _zeme values ('GW', trim('Guinea-Bissau '));
insert into _zeme values ('GY', trim('Guyana '));
insert into _zeme values ('HT', trim('Haiti '));
insert into _zeme values ('HM', trim('Heardův ostrov a MacDonaldovy ostrovy '));
insert into _zeme values ('HN', trim('Honduras '));
insert into _zeme values ('HK', trim('Hongkong '));
insert into _zeme values ('CL', trim('Chile '));
insert into _zeme values ('HR', trim('Chorvatsko '));
insert into _zeme values ('IN', trim('Indie '));
insert into _zeme values ('ID', trim('Indonésie '));
insert into _zeme values ('IQ', trim('Irák '));
insert into _zeme values ('IR', trim('Írán '));
insert into _zeme values ('IE', trim('Irsko '));
insert into _zeme values ('IS', trim('Island '));
insert into _zeme values ('IT', trim('Itálie '));
insert into _zeme values ('IL', trim('Izrael '));
insert into _zeme values ('JM', trim('Jamajka '));
insert into _zeme values ('JP', trim('Japonsko '));
insert into _zeme values ('YE', trim('Jemen '));
insert into _zeme values ('JE', trim('Jersey '));
insert into _zeme values ('ZA', trim('Jižní Afrika '));
insert into _zeme values ('GS', trim('Jižní Georgie a Jižní Sandwichovy ostrovy '));
insert into _zeme values ('SS', trim('Jižní Súdán '));
insert into _zeme values ('JO', trim('Jordánsko '));
insert into _zeme values ('KY', trim('Kajmanské ostrovy '));
insert into _zeme values ('KH', trim('Kambodža '));
insert into _zeme values ('CM', trim('Kamerun '));
insert into _zeme values ('CA', trim('Kanada '));
insert into _zeme values ('CV', trim('Kapverdy '));
insert into _zeme values ('QA', trim('Katar '));
insert into _zeme values ('KZ', trim('Kazachstán '));
insert into _zeme values ('KE', trim('Keňa '));
insert into _zeme values ('KI', trim('Kiribati '));
insert into _zeme values ('CC', trim('Kokosové (Keelingovy) ostrovy '));
insert into _zeme values ('CO', trim('Kolumbie '));
insert into _zeme values ('KM', trim('Komory '));
insert into _zeme values ('CG', trim('Konžská republika '));
insert into _zeme values ('KP', trim('Korejská lidově demokratická republika '));
insert into _zeme values ('KR', trim('Korejská republika '));
insert into _zeme values ('XK', trim('Kosovo '));
insert into _zeme values ('CR', trim('Kostarika '));
insert into _zeme values ('CU', trim('Kuba '));
insert into _zeme values ('KW', trim('Kuvajt '));
insert into _zeme values ('CY', trim('Kypr '));
insert into _zeme values ('KG', trim('Kyrgyzstán '));
insert into _zeme values ('LA', trim('Laos '));
insert into _zeme values ('LS', trim('Lesotho '));
insert into _zeme values ('LB', trim('Libanon '));
insert into _zeme values ('LR', trim('Libérie '));
insert into _zeme values ('LY', trim('Libye '));
insert into _zeme values ('LI', trim('Lichtenštejnsko '));
insert into _zeme values ('LT', trim('Litva '));
insert into _zeme values ('LV', trim('Lotyšsko '));
insert into _zeme values ('LU', trim('Lucembursko '));
insert into _zeme values ('MO', trim('Macao '));
insert into _zeme values ('MG', trim('Madagaskar '));
insert into _zeme values ('HU', trim('Maďarsko '));
insert into _zeme values ('MK', trim('Makedonie '));
insert into _zeme values ('MY', trim('Malajsie '));
insert into _zeme values ('MW', trim('Malawi '));
insert into _zeme values ('MV', trim('Maledivy '));
insert into _zeme values ('ML', trim('Mali '));
insert into _zeme values ('MT', trim('Malta '));
insert into _zeme values ('IM', trim('Man '));
insert into _zeme values ('MA', trim('Maroko '));
insert into _zeme values ('MH', trim('Marshallovy ostrovy '));
insert into _zeme values ('MQ', trim('Martinik '));
insert into _zeme values ('MU', trim('Mauricius '));
insert into _zeme values ('MR', trim('Mauritánie '));
insert into _zeme values ('YT', trim('Mayotte '));
insert into _zeme values ('UM', trim('Menší odlehlé ostrovy USA '));
insert into _zeme values ('MX', trim('Mexiko '));
insert into _zeme values ('FM', trim('Mikronésie '));
insert into _zeme values ('MD', trim('Moldavsko '));
insert into _zeme values ('MC', trim('Monako '));
insert into _zeme values ('MN', trim('Mongolsko '));
insert into _zeme values ('MS', trim('Montserrat '));
insert into _zeme values ('MZ', trim('Mosambik '));
insert into _zeme values ('MM', trim('Myanmar '));
insert into _zeme values ('NA', trim('Namibie '));
insert into _zeme values ('NR', trim('Nauru '));
insert into _zeme values ('DE', trim('Německo '));
insert into _zeme values ('NP', trim('Nepál '));
insert into _zeme values ('NE', trim('Niger '));
insert into _zeme values ('NG', trim('Nigérie '));
insert into _zeme values ('NI', trim('Nikaragua '));
insert into _zeme values ('NU', trim('Niue '));
insert into _zeme values ('NL', trim('Nizozemsko '));
insert into _zeme values ('NF', trim('Norfolk '));
insert into _zeme values ('NO', trim('Norsko '));
insert into _zeme values ('NC', trim('Nová Kaledonie '));
insert into _zeme values ('NZ', trim('Nový Zéland '));
insert into _zeme values ('OM', trim('Omán '));
insert into _zeme values ('PK', trim('Pákistán '));
insert into _zeme values ('PW', trim('Palau '));
insert into _zeme values ('PS', trim('Palestina '));
insert into _zeme values ('PA', trim('Panama '));
insert into _zeme values ('PG', trim('Papua Nová Guinea '));
insert into _zeme values ('PY', trim('Paraguay '));
insert into _zeme values ('PE', trim('Peru '));
insert into _zeme values ('PN', trim('Pitcairn '));
insert into _zeme values ('CI', trim('Pobřeží slonoviny '));
insert into _zeme values ('PL', trim('Polsko '));
insert into _zeme values ('PR', trim('Portoriko '));
insert into _zeme values ('PT', trim('Portugalsko '));
insert into _zeme values ('AT', trim('Rakousko '));
insert into _zeme values ('RE', trim('Réunion '));
insert into _zeme values ('GQ', trim('Rovníková Guinea '));
insert into _zeme values ('RO', trim('Rumunsko '));
insert into _zeme values ('RU', trim('Rusko '));
insert into _zeme values ('RW', trim('Rwanda '));
insert into _zeme values ('GR', trim('Řecko '));
insert into _zeme values ('PM', trim('Saint Pierre a Miquelon '));
insert into _zeme values ('SV', trim('Salvador '));
insert into _zeme values ('WS', trim('Samoa '));
insert into _zeme values ('SM', trim('San Marino '));
insert into _zeme values ('SA', trim('Saúdská Arábie '));
insert into _zeme values ('SN', trim('Senegal '));
insert into _zeme values ('MP', trim('Severní Mariany '));
insert into _zeme values ('SC', trim('Seychely '));
insert into _zeme values ('SL', trim('Sierra Leone '));
insert into _zeme values ('SG', trim('Singapur '));
insert into _zeme values ('SK', trim('Slovensko '));
insert into _zeme values ('SI', trim('Slovinsko '));
insert into _zeme values ('SO', trim('Somálsko '));
insert into _zeme values ('AE', trim('Spojené arabské emiráty '));
insert into _zeme values ('US', trim('Spojené státy '));
insert into _zeme values ('RS', trim('Srbsko '));
insert into _zeme values ('CF', trim('Středoafrická republika '));
insert into _zeme values ('SD', trim('Súdán '));
insert into _zeme values ('SR', trim('Surinam '));
insert into _zeme values ('SH', trim('Svatá Helena '));
insert into _zeme values ('LC', trim('Svatá Lucie '));
insert into _zeme values ('BL', trim('Svatý Bartoloměj '));
insert into _zeme values ('KN', trim('Svatý Kryštof a Nevis '));
insert into _zeme values ('MF', trim('Svatý Martin (FR) '));
insert into _zeme values ('SX', trim('Svatý Martin (NL) '));
insert into _zeme values ('ST', trim('Svatý Tomáš a Princův ostrov '));
insert into _zeme values ('VC', trim('Svatý Vincenc a Grenadiny '));
insert into _zeme values ('SZ', trim('Svazijsko '));
insert into _zeme values ('SY', trim('Sýrie '));
insert into _zeme values ('SB', trim('Šalomounovy ostrovy '));
insert into _zeme values ('ES', trim('Španělsko '));
insert into _zeme values ('SJ', trim('Špicberky a Jan Mayen '));
insert into _zeme values ('LK', trim('Šrí Lanka '));
insert into _zeme values ('SE', trim('Švédsko '));
insert into _zeme values ('CH', trim('Švýcarsko '));
insert into _zeme values ('TJ', trim('Tádžikistán '));
insert into _zeme values ('TZ', trim('Tanzanie '));
insert into _zeme values ('TH', trim('Thajsko '));
insert into _zeme values ('TW', trim('Tchaj-wan '));
insert into _zeme values ('TG', trim('Togo '));
insert into _zeme values ('TK', trim('Tokelau '));
insert into _zeme values ('TO', trim('Tonga '));
insert into _zeme values ('TT', trim('Trinidad a Tobago '));
insert into _zeme values ('TN', trim('Tunisko '));
insert into _zeme values ('TR', trim('Turecko '));
insert into _zeme values ('TM', trim('Turkmenistán '));
insert into _zeme values ('TC', trim('Turks a Caicos '));
insert into _zeme values ('TV', trim('Tuvalu '));
insert into _zeme values ('UG', trim('Uganda '));
insert into _zeme values ('UA', trim('Ukrajina '));
insert into _zeme values ('UY', trim('Uruguay '));
insert into _zeme values ('UZ', trim('Uzbekistán '));
insert into _zeme values ('CX', trim('Vánoční ostrov '));
insert into _zeme values ('VU', trim('Vanuatu '));
insert into _zeme values ('VA', trim('Vatikán '));
insert into _zeme values ('GB', trim('Velká Británie '));
insert into _zeme values ('VE', trim('Venezuela '));
insert into _zeme values ('VN', trim('Vietnam '));
insert into _zeme values ('TL', trim('Východní Timor '));
insert into _zeme values ('WF', trim('Wallis a Futuna '));
insert into _zeme values ('ZM', trim('Zambie '));
insert into _zeme values ('EH', trim('Západní Sahara '));
insert into _zeme values ('ZW', trim('Zimbabwe '));
INSERT INTO ps_country_lang (id_country, id_lang, name)
(
SELECT ps_country.id_country,
(SELECT id_lang FROM ps_lang WHERE iso_code = 'cs'),
_zeme.popis
FROM _zeme
JOIN ps_country ON _zeme.id = ps_country.iso_code COLLATE utf8_general_ci
)
ON DUPLICATE KEY UPDATE name=popis;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment