My favorites | Sign in
Project Logo
                
People details
Project owners:
  dd.nexus

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

Localist helps in multilanguage/globalized rails 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

Requirements

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

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

Repository

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

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 %>  

Author and Copyright

Copyright (c) 2007 by Domizio Demichelis









Hosted by Google Code