0.0
No commit activity in last 3 years
No release in over 3 years
Ruby gem to populate language select dropdown list
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.6
>= 0
 Project Readme

Language Select

Ruby gem to populate language select dropdown list

Provides a simple helper to get an HTML select list of languages. The list of countries comes from the ISO ISO 639-1 standard (http://www.w3schools.com/tags/ref_language_codes.asp).

Installation

Install as a gem using

gem install language-select

Or put the following in your Gemfile

gem 'language-select'

Example

Simple use supplying model attribute as parameters:

form.language_select("language", nil, nil, nil)

Supplying specific languages to be listed instead of all the languages:

form.language_select("language", [ "English", "Spanish", "French" ], nil, nil)    

Supplying additional languages to be listed, additinally to the default list of languages:

form.language_select("language", nil, {"Filipino" => "fil", "Mandarin" => "man"}, nil)

Supplying priority languages to be listed at the top of the list:

form.language_select("language", nil, nil [ "English", "Spanish", "French" ])

Copyright (c) 2014 Viduranga Wijesooriya, released under the MIT license