Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Language code list? (ISO 639-1?
Arlen Cuss
4/27/2008 7:29:00 AM
[Note: parts of this message were removed to make it a legal post.]
Hi there,
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?
Something like a list like this:
http://en.wikipedia.org/wiki/List_of_ISO_6...
I could scrape it from the page and coerce it into a tneable format, but I
don't want to reinvent the wheel.
Cheers,
Arlen.
3 Answers
Arlen Cuss
4/27/2008 7:37:00 AM
0
[Note: parts of this message were removed to make it a legal post.]
Well, I found this:
http://www.iana.org/assignments/language-subta...
And I did mean a "tenable" format - one which I'd still like, should it
exist. Otherwise this'll be a piece of cake anyway.
Arlen
Siep Korteling
4/27/2008 8:55:00 PM
0
Arlen Cuss wrote:
> Hi there,
>
> 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?
> Something like a list like this:
>
>
http://en.wikipedia.org/wiki/List_of_ISO_6...
>
> I could scrape it from the page and coerce it into a tneable format, but
> I
> don't want to reinvent the wheel.
>
> Cheers,
> Arlen.
http://locale.rubyforge.org/svn/...
Regards,
Siep
--
Posted via
http://www.ruby-...
.
Michael Granger
4/28/2008 5:59:00 AM
0
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/...
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...
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 <ged@FaerieMUD.org>
Rubymage, Architect, Believer
The FaerieMUD Consortium <
http://www.FaerieMU...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Language code list? (ISO 639-1?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password