Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Is there a way to add a country? #66

Open
Mislavoo7 opened this issue Nov 3, 2021 · 1 comment
Open

Is there a way to add a country? #66

Mislavoo7 opened this issue Nov 3, 2021 · 1 comment

Comments

@Mislavoo7
Copy link

I had to add Kosovo and rename "Macedonia (the former Yugoslav Republic of)" to "North Macedonia". I fixed my issue by adding this:

class XXK < IsoCountryCodes::Code
  self.numeric = nil
  self.name    = %q{Kosovo}
  self.alpha2  = %q{XK}
  self.alpha3  = %q{XXK}
  self.iban    = 'XK'
  self.main_currency = 'EUR'
  self.continent = 'EU'
  self.calling = '+383'
end

IsoCountryCodes::Code::MKD.module_eval do
  self.name    = %q{North Macedonia}
end

Because I use the gem for Ruby on Rails I added the code to: config/initializers/adjust_iso_country_codes.rb.
Kosovo appears on the last place. Where can I add .sort_by to resort all the countries?

@sausyn
Copy link

sausyn commented Dec 27, 2021

There is an open pull request with this data and a correction for South Sudan continent:
#61

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants