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 !
josevalim (author)
Tue Mar 31 06:07:59 -0700 2009
commit  4280833fa586fd26dacf20cd8c8c8974914815bb
tree    3ac7209e6d1bc46baf275fde2b684817856d7ab4
parent  852ac754340e0711ade5a833cfd9ae9b449eb80b
100644 61 lines (40 sloc) 1.751 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
LocalizedTemplates
License: MIT
Version: 0.4
 
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.
 
This is an alternative to Rails 2.3 templates localization schema. If you are
localizing almost all of your views, it definitely suits you better because
your views will be better organized.
 
Installation
=================
 
Install LocalizedTemplates is very easy. If you are running run on Rails 2.3
just do the following:
 
  gem sources -a http://gems.github.com
  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:
 
   script/plugin install git://github.com/josevalim/localized_templates.git
 
If you are running on Rails 2.2, you should use version 0.3.1:
 
    cd myapp
    git clone git://github.com/josevalim/localized_tempaltes.git
    cd vendor/plugins/localized_templates
    git checkout v0.3.1
    rm -rf ./.git
 
 
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/