Closed nyamsprod closed 7 years ago
As much as I appreciate the work, I think I would rather create an additional package called iso3166-intl
, which both adds this support and also introduces the extra dependency on ext-intl
(assuming the intl extension is the preferred solution, I am not sure of that yet).
A DataLocalizer class is added. This class enables localizing the country full name using:
ISO3166::KEY_ALPHA3
.The public API is as follow:
A simple usage will be:
The result is a generator you can iterate over where each entry has a new key
local_name
with the country name being localized as its value.local_get_default
A possible BC break is that this feature relies on PHP intl extension which is AFAIK bundle by default since PHP5.5.
This feature may resolve #11