Countries v1.7.0
Breaking changes
New format for country names.
The country names (property name.native
) now contains every native languages. Thus the nativeLanguage
property, which used to identify the language code used for the native country names, has been removed.
Before
{
"name": {
"common": "Peru",
"official": "Republic of Peru",
"native": {
"common": "Per\u00fa",
"official": "Rep\u00fablica del Per\u00fa"
}
},
"...": "...",
"nativeLanguage": "spa",
"languages": {
"aym": "Aymara",
"que": "Quechua",
"spa": "Spanish"
}
}
After
{
"name": {
"common": "Peru",
"official": "Republic of Peru",
"native": {
"aym": {
"official": "Piruw Suyu",
"common": "Piruw"
},
"que": {
"official": "Piruw Ripuwlika",
"common": "Piruw"
},
"spa": {
"official": "Rep\u00fablica del Per\u00fa",
"common": "Per\u00fa"
}
}
},
"...": "...",
"languages": {
"aym": "Aymara",
"que": "Quechua",
"spa": "Spanish"
}
}
New format for translations
As proposed by @herrniemand, the format for translations has been updated to include official country names. Hereafter an example for Peru:
Before
{
"translations": {
"deu": "Peru",
"fra": "P\u00e9rou",
"hrv": "Peru",
"ita": "Per\u00f9",
"jpn": "\u30da\u30eb\u30fc",
"nld": "Peru",
"por": "Per\u00fa",
"rus": "\u041f\u0435\u0440\u0443",
"spa": "Per\u00fa"
}
}
After
{
"translations": {
"deu": {"official": "Republik Peru", "common": "Peru"},
"fra": {"official": "R\u00e9publique du P\u00e9rou", "common": "P\u00e9rou"},
"hrv": {"official": "Republika Peru", "common": "Peru"},
"ita": {"official": "Repubblica del Per\u00f9", "common": "Per\u00f9"},
"jpn": {"official": "\u30da\u30eb\u30fc\u5171\u548c\u56fd", "common": "\u30da\u30eb\u30fc"},
"nld": {"official": "Republiek Peru", "common": "Peru"},
"por": {"official": "Rep\u00fablica do Peru", "common": "Per\u00fa"},
"rus": {"official": "\u0420\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u041f\u0435\u0440\u0443", "common": "\u041f\u0435\u0440\u0443"},
"spa": {"official": "Rep\u00fablica de Per\u00fa", "common": "Per\u00fa"}
}
}
Addition
add alternative name and spellings for East Timor
Build
A new build system has been introduced by @petert82. The single script is split up into individual files in src/
and the symfony Console component as a dependency, to make it nice and easy to extend the conversion options in future.
To build the dist
files, the command is now php countries.php convert
.
Updates
change Lithuania currency to EUR
change zambian currency to ZMW
Fixes
fix Kosovo calling code
fix demonym of Myanmar
fix official Swahili name of Kenya
Again, a huge thank you goes to @herrniemand and @petert82 for their ideas and help on this.