Plugins - Localist

StarAdd to favorites

"If you need to go global, a Localist may help!" :-)

Localist helps in multilanguage/globalized applications. It automatically finds the best match between the locales accepted by your users and the locales supported by your application (per rules defined in RFC2616, section 14.4: HTTP/1.1 - Header Field Definitions - Accept-Language) and maintain it in successive requests. It also offers a nice country-flag menu to allow the users to manually switch to another locale.

Features:

  • only 3-5 lines of code required to use it
  • finds, sets and maintains the best locale match in successive requests
  • smart fallback when no match is possible
  • RFC2616 compilant
  • provides a nice flag menu with the active locale indicator
  • allows the user to manually switch the locale
  • includes the flag icons of all the ISO3166-1 alpha-2 countries
  • fully configurable (by variables)
  • fully customizable (by overriding methods and templates)

Requirements

Download the meta-tools lib form here http://ruby.4pro.net/meta-tools/download/ and install it:

% [sudo] gem install meta-tools-1.0.gem

Quick Start

in app/controllers/application.rb:

  before_filter :localist

in config/environment.rb:

  Localist.supported_locales = %w[ en-US it-IT es-ES fr-FR ..... ]
  Localist.callback = lambda{ |client_locale| do_something_with( client_locale ) }

in the head container of your layout:

  <%= stylesheet_link_tag "localist/stylesheet.css", :media=>'all' %>

somewhere in the body container of your layout or template:

  <%= localist_menu %>

Domizio Demichelis

http://code.google.com/p/rails-localist/

http://rails-localist.googlecode.com/svn/trunk/

Rails' (MIT)

  • Currently 3.3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Internationalization

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?