﻿
= Localization Simplified (aka LocalizationSimplified or L10n-simplified)

Localization Simplified plugin for Ruby on Rails. Really simple localization. Written by Jesper Rønn-Jensen ( http://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)

=== What it does
This plugin modifies the following most used helpers for Rails
* Localized monthnames on date_select etc. (changing the order of Y-M-D, on date_select and datetime_select from 0.7)
* Localized ActiveRecord errors (and error headings)
* Localized distance_of_time_in_words
* Localized to_currency (from 0.7 also changing the order of unit/currency)
* Simple pluralization also available in the lang-file 
* Uses standard Rails methods. In this way, there is no tedious rewrite required 
  to localize your view files


=== Limitations
* More advanced features are not likely to be available here.
* If you want support for multiple languages, use another L10N/I18n plugin, like 
  GLoc or Globalize
It could be a good idea to take a look at the [comparison chart](http://wiki.rubyonrails.org/rails/pages/InternationalizationComparison) on the Ruby on Rails wiki

=== Version notes
* For Rails 1.1.x or below, use version 0.7.1 of this plugin
* For Rails 1.2 or above, use version 0.8 (or higher) of this plugin

=== Download code
* Project homepage: http://rubyforge.org/projects/l10n-simplified/
* Subversion access: svn checkout svn://rubyforge.org/var/svn/l10n-simplified
* Browse: http://rubyforge.org/plugins/scmsvn/viewcvs.php/?root=l10n-simplified



=== Usage:
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 containing non-English characters (such as ß,ö,ñ or å), you probably also want to save your files as UTF-8.

=== Supported languages
Currently supported languages:
* Czech
* Danish
* Dutch
* English (for running test cases and comparing to normal texts)
* Finnish
* French
* French (Canadian)
* German 
* Italian
* Korean
* Norwegian
* Portugese 
* Russian
* Serbian
* Spanish
* Spanish (argentinian)
* Swedish
* Swedish Chef, and 
* Pirate talk (just for the fun of it)
* any other language you want. Just dump your translation in the /lib folder 

=== Installation:

1. Just copy this plugin into your /vendor/plugins/ folder
2. Set your language in environment.rb 
   L10N_LANG = :es
   (Danish is default because I am Danish)
3. no step three :)


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.

=== Your help
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.

 
=== TODO / wishlist
* A Rails application for testing L10n-simplified. This is top of my wish-list. 
  I'd like it to contain a test suite testing ActiveRecord errors, datehelper, necessary
  numberhelper etc. 
* Better tests to verify both hooks in Rails and this plugin
* Better tests to verify each lang-file
* Create rdoc not including every lang-file (only lang_en.rb)
* Rake task that modifies all view-files and converts them to UTF-8 
* Also a task that modifies all generators to use UTF-8
* Create gem file for easy distribution (and automatic plugin discovery in tools like RadRails)

=== CHANGELOG
See file changelog.txt


=== Credits
This plugin uses a few bits and pieces from other Rails plugins GLoc (http://rubyforge.org/projects/gloc/) and swe_rails (http://opensource.ki.se/swe_rails.html)


Created 2006-07-28 by 
Jesper Rønn-Jensen, [justaddwater.dk](http://justaddwater.dk/)
http://rubyforge.org/projects/l10n-simplified/
http://agilewebdevelopment.com/plugins/localization_simplified
