From: Michael Granger Date: 2008-04-28T14:58:51+09:00 Subject: Re: Language code list? (ISO 639-1?) On Apr 27, 2008, at 1:55 PM, Siep Korteling wrote: > Arlen Cuss wrote: >> I'm wondering there's any built-in list or gem that has the list of >> language >> codes/country names/language names (native/foreign, either's good) in >> it? >> [...] > http://locale.rubyforge.org/svn/trunk/lib/ The locale module looks great! It seems like a pretty comprehensive interface to what you need, but if you happen to need something in one file, and don't need predicates and such, the Linguistics gem also has both the iso639-1 and iso639-2 codes in a module: http://deveiate.org/projects/Linguistics/browser/trunk/lib/linguistics/iso639.rb Example usage: irb(main):001:0> require 'linguistics/iso639' => true irb(main):002:0> Linguistics::LanguageCodes['en'] => {:codes=>["eng", "en"], :desc=>"English"} irb(main):003:0> Linguistics::LanguageCodes['sog'] => {:codes=>["sog"], :desc=>"Sogdian"} -- Michael Granger Rubymage, Architect, Believer The FaerieMUD Consortium