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:

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
-
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.
-
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?
-
@ 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)
-
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


