| Path: | README |
| Last Update: | Thu Sep 07 12:03:56 Romance Daylight Time 2006 |
= Localization Simplified (LocalizationSimplified)
Localization Simplified plugin for Ruby on Rails. Really simple localization. Written by Jesper Rønn-Jensen ( justaddwater.dk/ )
The goal is to have a dead simple plugin for one-language (non-english) Rails applications. Many of the existing localization / internationalization plugins are too big for this and hard to get started with. Just dump this plugin in /vendor/plugins/, set your language and off you go.
Unlike the more advanced plugins, you don’t have to translate anything in your view files. Just use the standard Rails commands you’re used to.
The simple approach also makes limits. Make sure you understand them to decide if this plugin is right for you.
I use this plugin when creating new projects. Then later in the development process I can decide to change to a more advanced localization plugin (if necessary)
This plugin modifies the following most used helpers for Rails
The reason why I have not reordered the datetime_select fields or currency is that it will introduce an unnecessary dependency here (because functions have to be recoded).
Currently supported languages:
in init.rb, set your language. That’s it. Now your db connection is running UTF-8 and standard Rails output is localized.
If your view files contains text, you probably also want to save your files as UTF-8.
1) Just copy this plugin into your /vendor/lib folder 2) Choose your lang-file in init.rb (default is Danish because I am Danish)
A special note of WARNING: All files here are saved using UTF-8 encoding. It’s not required for working, I guess, but other encodings could bring you in trouble.
"onsdag d. 23 august 2006 12:38:22" (Danish)
Feel free to use, translate, modify and improve this code. Do send me translations, improvements, etc. I cannot promise to use it, but chances are that I will unless it bloats the code here completely or makes code harder to maintain.
I added FIXME notes in the code to indicate where I also could use help.
This plugin uses a few bits and pieces from other Rails plugins GLoc (rubyforge.org/projects/gloc/) and swe_rails (opensource.ki.se/swe_rails.html)
Created 2006-07-28 by Jesper Rønn-Jensen justaddwater.dk/