LanguageSelectRails
Provides a HTML select of languages for Rails. The list comes from ISO 639 standard.
Installation
Add this line to your application's Gemfile:
gem 'language_select_rails'And then execute:
$ bundle
Or install it yourself as:
$ gem install language_select_rails
Usage
Creates a language select tag
language_select('user', 'language')You can set a locale with :locale option
language_select('user', 'language', locale: 'th')You can set certain languages with :only option
language_select('user', 'language', only: [:en, :zh, :ja, :th])You can discard certain languages with :except option
language_select('user', 'language', except: [:en, :zh, :ja, :th])Contributing
- Fork it ( https://github.com/kiterminal/language_select_rails/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Copyright
Copyright (c) 2015 Chainarin Thanichaiyawat.