public
Description: Another templates localization schema for Rails 2.3 which allows you to create a folder for each locale on your views root
Homepage: http://blog.plataformatec.com.br/
Clone URL: git://github.com/josevalim/localized_templates.git
Click here to lend your support to: localized_templates and make a donation at www.pledgie.com !
name age message
file MIT-LICENSE Sat Nov 29 14:29:18 -0800 2008 Added gemspec [josevalim]
file README Loading commit data...
file Rakefile
file init.rb Sun Jan 04 02:47:17 -0800 2009 Bug fix in gem [josevalim]
directory lib/
file localized_templates.gemspec
directory test/
README
LocalizedTemplates
License: MIT
Version: 0.3.1

Description
==================

This plugin uses Rails I18n (http://rails-i18n.org/) to allow templates localization.
You can localize your views using the following naming convention:

  <tt>pt-BR/projects/index.html.erb</tt>
  <tt>en-US/projects/edit.rss.builder</tt>
  
And you can also localize rescue files:

  <tt>public/pt-BR/404.html</tt>
  <tt>public/en-US/404.html</tt>

If you don't want to localize a file (like a xml file), simply don't move it and it will be
rendered as default to all languages.

Installation
=================

Install LocalizedTemplates is very easy. It is stored in GitHub, so if you have
never installed a gem via GitHub run the following:

  gem sources -a http://gems.github.com

Then install the gem:

  sudo gem install josevalim-localized_templates

In RAILS_ROOT/config/environment.rb:

  config.gem "josevalim-localized_templates",  :lib => "localized_templates", :source => "http://gems.github.com"

If you want it as plugin, just do:

    cd myapp
    git clone git://github.com/josevalim/localized_templates.git
    rm -rf vendor/plugins/localized_templates/.git

Adding a new locale
=================

To add a new locale, simply create a new file in config/locales. You can make your life easier by copying an existing
locale and basing your new locale on it.

Check installed locales
=================

To display a list of all locales installed in config/locales, you can use the following rake command:

  rake locales

Changing the default locale
=================

If you want to use a default locale other than en-US, you have to tell the i18n plugin the locale you want to use by
default. Simply put the following line in an initializer in config/initializers or include it in your environment.rb:

    I18n.default_locale = 'de-AT'

Bugs and Feedback
=================

If you discover any bugs, please send an e-mail to jose.valim@gmail.com
If you just want to give some positive feedback or drop a line, that's fine too! =)

Copyright (c) 2009 José Valim
http://www.pagestacker.com/
http://josevalim.blogspot.com/