A list of languages based upon ISO-639-1 and ISO-639-3 with functions to retrieve only common languages.
Ruby
Latest commit 07288b2 Jul 28, 2015 @scsmith Merge pull request #11 from molgin/case-insensitive-lookup
Make lookup case-insensitive
Permalink
Failed to load latest commit information.
data
lib make lookup case-insensitive Jul 27, 2015
test make lookup case-insensitive Jul 27, 2015
.gitignore Gemify (version 0.0.1) Jun 15, 2011
.travis.yml Test with modern rubies Mar 10, 2015
Gemfile
README.md Add build status image Mar 10, 2015
Rakefile Add a rake task to create dump data from yml Mar 10, 2015
language_list.gemspec Ensure rake is specified as a dependancy and use rake test for travis Feb 5, 2014

README.md

Language List

A list of languages based upon ISO-639-1 and ISO-639-3 with functions to retrieve only common languages.

Build Status

Examples

# Get an array of LanguageList::LanguageInfo classes
all_languages = LanguageList::ALL_LANGUAGES
common_languages = LanguageList::COMMON_LANGUAGES

# Finding a language based on its ISO-639-1 or ISO-639-3 code or
# name
german  = LanguageList::LanguageInfo.find('German')
english = LanguageList::LanguageInfo.find('en')
english.name.inspect #=> "English"
english.iso_639_1.inspect #=> "en"
english.iso_639_3.inspect #=> "eng"
english.common? #=> true

Testing

rake

Thanks

Thanks goes to Steve Hardie for his work on creating a list of common languages (http://stevehardie.com/2009/10/list-of-common-languages/).

License

I don't actually know the license for this project. The project contains countries from the ISO language list although they were not obtained from the ISO website. The country list has been adapted and placed in data/languages.yml, so that it can be replaced if required.

All of the code (everything except data/languages.yml) in this project is released under an MIT license.