ISO code lookups in Ruby for Currencies, Countries and Languages.
Ruby
Latest commit 561495f Jul 27, 2009 @danwrong corrected readme error
Permalink
Failed to load latest commit information.
csv initial commit Jul 27, 2009
lib initial commit Jul 27, 2009
test initial commit Jul 27, 2009
.gitignore generated gemspec Jul 27, 2009
CHANGELOG initial commit Jul 27, 2009
LICENSE initial commit Jul 27, 2009
Manifest generated gemspec Jul 27, 2009
README corrected readme error Jul 27, 2009
Rakefile generated gemspec Jul 27, 2009
iso_codes.gemspec generated gemspec Jul 27, 2009

README

ISO Codes
---------

Dan Webb (dan@massiverobot.co.uk)

Small and simple Ruby gem that allows you to look up and list ISO codes for
countries, languages and currencies.

Each part of the library is lazily loaded so you only load the data you use.
If you'd like to add any other useful ISO code lookups then feel free to fork.

Source data from: http://www.commondatahub.com/ and will be kept up to date 
periodically.

Usage
-----

require 'rubygems'
require 'iso_codes'

ISOCodes::Language.all #=> An array of all language objects (for filling form selects etc)
ISOCodes::Language.find_by_a2('en') #=> find the language with the 2 character code 'en'

ISOCodes::Country.find_all_by_region('Europe') #=> returns all countries in Europe

ISOCodes::Currency.find_by_country('GB') #=> returns Currency representing GBP

For more info check the tests.