alexrabarts / iso_country_codes

A Ruby library that provides ISO 3166-1 country codes/names and ISO 4217 currencies
http://github.com/alexrabarts/iso-country-codes
163 stars 62 forks source link

Kosovo is now a country. #25

Closed EOengineer closed 9 years ago

EOengineer commented 9 years ago

Kosovo has recently become recognized as a country. It appears the wiki page you are scraping has not updated, and the timeline is uncertain on when that may happen. Would there be an objection to submitting a PR that injects Kosovo manually into the list? There appears to be a recommendation to use "XK" at https://geonames.wordpress.com/2010/03/08/xk-country-code-for-kosovo/ .

greysteil commented 9 years ago

I'd rather stick to the wikipedia list for now - looks like it's not quite there by ISO standards yet (see https://en.wikipedia.org/wiki/International_recognition_of_Kosovo#International_non-governmental_organisations).

In the meantime you might want to monkey-patch your code - see https://github.com/alexrabarts/iso_country_codes/pull/22 for an example of how we recommend overwriting a country's name - I imagine the approach here would be similar.

hughevans commented 9 years ago
class IsoCountryCodes
  #http://en.wikipedia.org/wiki/ISO_3166-2:XK
  class KOS < Code
    self.numeric = nil
    self.name    = %q{Kosovo}
    self.alpha2  = %q{XK}
    self.alpha3  = nil
  end
end
pirj commented 3 years ago

Is it a good moment to reconsider this?

Among the G20 countries, eleven have recognized Kosovo's independence: Australia, Canada, France, Germany, Italy, Japan, South Korea, Saudi Arabia, Turkey, the United Kingdom and the United States. Eight, however, have not: Argentina, Brazil, China, India, Indonesia, Mexico, Russia and South Africa.