Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (18 sloc) 847 Bytes
ISO Codes
Dan Webb (
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: and will be kept up to date
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.
Jump to Line
Something went wrong with that request. Please try again.