No commit activity in last 3 years
No release in over 3 years
Provides a HTML select of languages for Rails. The list comes from ISO 639-1 standard.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.9
~> 0.8
~> 10.0
~> 3.2
~> 0.10

Runtime

~> 0.7.0
 Project Readme

Gem Version Dependency Status Build Status Coverage Status Code Climate

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

  1. Fork it ( https://github.com/kiterminal/language_select_rails/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Copyright

Copyright (c) 2015 Chainarin Thanichaiyawat.