Blogger.create { :name =>'Matt Aimonetti',
:location => 'San Diego, Ca',
:email => mattaimonetti AT gmail.com,
:linkedin => Matt's Linkedin page,
:recommend_me => HERE,
:contractor => true}

Globalite - sample application

Written by matt on July 2nd, 2007

I recently received quite a lot of love because of Globalite. Even though I tried to write some documentation about the plugin, I know that there's not much. I also know that there's a difference between showing how to set a locale and how to actually use that code in a real application.

To fill this gap I wrote a very simple and rough Rails sample application with a fully localized User Interface:

UI Localization sample app

Looking at the code you will find out how to:

  • use a different css per locale (language/country)
  • use a different picture per locale
  • set a default css/picture if the translator doesn't specify one
  • UI localization
  • rails core localization examples
  • create a select box of available UI translations
  • get/set the locale only a specific user so other users start by seeing the default translation
  • use a translation with many dynamic arguments
  • nested translation

note: I froze Edge for this sample app (it wasn't required, Globalite works well with older version of Rails).

To install and run the app, just do the following:

$ svn checkout http://globalite.googlecode.com/svn/sample/ui globalite-sample-app

edit config/database.example and rename it config/database.yml

$ rake db:create

$ rake db:migrate

$ ruby script/server

Don't hesitate to leave a comment, submit a Rails core localization file in your language or submit a bug



Comments

  • Karthik on 25 Jul 20:03

    Hi, I get the following error, when running the Rake task to create the DB. uninitialized constant ActionController::Base::DEPRECATED_INSTANCE_VARIABLES, Am I having a right version? Rgds, Karthik.
  • Pablo on 05 Aug 14:53

    Actually, in Spain we use exactly the same format for euros as in France. Where did you get the idea that we put the euro symbol in front?

  • Matt Aimonetti on 05 Aug 22:22

    @ pablo from Ikea.es web site. Could you please submit a corrected version of the globalite language file for Rails code in Spanish (from Spain)

  • Cesidio on 08 Aug 02:09

    Hi Matt, thanks very much for this great plugin. I was wondering about how to manage simple database content in several languages. Even though your plugin still doesnt support it, do u have any tips about how i can proceed with it? thank

Comments are closed