The support for i18n is taken directly from intl-tel-input. They have a localizedCountries object, which is described as such:
Type: Object Default: {}
Allows to translate the countries by its given iso code e.g.:
{ 'de': 'Deutschland' }
This object is very basic in its i18n support, but it seems to have been serving the users of intl-tel-input fine so far. It surely is meeting my needs (both as a user of intl-tel-input and country-select-js) so I think it would be a good idea to add localizedCountries into country-select-js. I've also imported code from intl-tel-input so that the country array is automatically sorted.
Let me know your thoughts.
Also, please note this is my first ever pull request. I hope I have done it correctly, but I can't offer any guarantees.
This pull request addresses the issue #86
The support for i18n is taken directly from intl-tel-input. They have a
localizedCountries
object, which is described as such:This object is very basic in its i18n support, but it seems to have been serving the users of intl-tel-input fine so far. It surely is meeting my needs (both as a user of intl-tel-input and country-select-js) so I think it would be a good idea to add
localizedCountries
into country-select-js. I've also imported code from intl-tel-input so that the country array is automatically sorted.Let me know your thoughts.
Also, please note this is my first ever pull request. I hope I have done it correctly, but I can't offer any guarantees.