-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of the definite article (the) in country names #100
Comments
🤷 I am not sure to be honest. The short name (uppercase) often omits "the". But since this package contains the lowercase short name, maybe we should not omit it? But what is the added value of adding it? Is it going to help users identify the correct country? I am usually a fan of "less is more". |
In our use case we are providing data from our app (which uses the alpha-3 code internally) to a third party which is expecting the name instead. The third party are failing validation because we aren't using the name as it appears in the standard as far as they are concerned. I personally agree with you on the less is more (and dislike the idea of validating based on the name), but I guess the point of a standard is that everyone implementing that standard should use the same data, and the name as it appears in the library doesn't match any of the fields for the same country in the ISO3166-1 list. |
That seems like a very weird choice, also given the fact that the name of a country can be very different from a language perspective. This library happens to present all data in English (can't even tell if it qualifies as en-US or en-GB though) and does not offer translations, but generally it is much saner to use the code rather than the name. As a quick "fix", you could instantiate the library with a dataset that satisfies the third party criteria, e.g.: $data = array_column((new ISO3166())->all(), null, 'alpha2');
$data['KR']['name'] = 'Korea (the Republic of)';
$fixed = new ISO3166(array_values($data)); |
As a reference, for the name, I used the table provided at https://en.wikipedia.org/wiki/ISO_3166-1 since this library is focused on ISO3166-1 (though the name is misleading I will admit). |
Thank you for your time, especially pointing out the distinction of ISO 3166-1 vs 3166-2, that's a point I hadn't considered. |
Hi,
In ISO 3166-1 many countries in the official standard use the definite article (the) in their name.
An example is Korea (the Republic of) (alpha2 code KR)
The ISO standard list shows it as "Korea (the Republic of)": https://www.iso.org/obp/ui/#iso:code:3166:KR
This package shows it as "Korea (Republic of):" https://github.com/thephpleague/iso3166/blob/main/src/ISO3166.php#L1278
Does the standard allow for the definite article to be optional or is this an error / omssion?
The text was updated successfully, but these errors were encountered: