|
Project Information
Members
Links
|
'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
RequirementsDownload the meta-tools lib form here http://ruby.4pro.net/meta-tools/download/ and install it: % [sudo] gem install meta-tool-1.0.gem Repositoryhttp://rails-localist.googlecode.com/svn/trunk/ Quick Startin 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 CopyrightCopyright (c) 2007 by Domizio Demichelis |