No commit activity in last 3 years
No release in over 3 years
Countries and languages in I18n.locale for select_tag or output in 85 languages
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Countries and languages in I18n.locale

In currently 85 languages supplied by I18nData.
Languages and countries are stored as iso 639/iso 3166 - 2 letter code.
Methods are available in views.

@user.country == 'de'
@user.language == 'de'

User is from <%=country(@user.country)%> and speaks <%=language(@user.language)%>
User is from Germany and speaks German.

Please select you language <%=f.select_tag(:language,options_for_select(languages))%>
Select box with all 185 localized languages.

If you have special needs like renaming countries or only displaying a subset, have a look at the code and overwrite as necessary.

DEMO can be found in Gettext example application

Install

gem install countries_and_languages

# Gemfile
gem 'countries_and_languages', :require => 'countries_and_languages/rails'

Author

Michael Grosser
michael@grosser.it
License: MIT Build Status