josevalim / localized_templates

Another templates localization schema for Rails 2.3 which allows you to create a folder for each locale on your views root

This URL has Read+Write access

2a52a6f7 » josevalim 2009-01-30 Update README and Rakefile. 1 LocalizedTemplates
7f2bbc1c » josevalim 2008-10-25 Changed localized path to l... 2 License: MIT
e16fb5f8 » josevalim 2009-02-05 Rails 2.3 compatible version! 3 Version: 0.4
7f2bbc1c » josevalim 2008-10-25 Changed localized path to l... 4
2a52a6f7 » josevalim 2009-01-30 Update README and Rakefile. 5 Description
7f2bbc1c » josevalim 2008-10-25 Changed localized path to l... 6 ==================
7
8 This plugin uses Rails I18n (http://rails-i18n.org/) to allow templates localization.
9 You can localize your views using the following naming convention:
10
11 <tt>pt-BR/projects/index.html.erb</tt>
12 <tt>en-US/projects/edit.rss.builder</tt>
13
14 And you can also localize rescue files:
15
16 <tt>public/pt-BR/404.html</tt>
17 <tt>public/en-US/404.html</tt>
d7a817bf » josevalim 2008-09-10 First commit 18
336aca10 » josevalim 2008-12-18 Now using only locale/contr... 19 If you don't want to localize a file (like a xml file), simply don't move it and it will be
d7a817bf » josevalim 2008-09-10 First commit 20 rendered as default to all languages.
21
e16fb5f8 » josevalim 2009-02-05 Rails 2.3 compatible version! 22 This is an alternative to Rails 2.3 templates localization schema. If you are
23 localizing almost all of your views, it definitely suits you better because
24 your views will be better organized.
25
d7a817bf » josevalim 2008-09-10 First commit 26 Installation
27 =================
28
e16fb5f8 » josevalim 2009-02-05 Rails 2.3 compatible version! 29 Install LocalizedTemplates is very easy. If you are running run on Rails 2.3
30 just do the following:
d7a817bf » josevalim 2008-09-10 First commit 31
612dda54 » josevalim 2008-11-29 Added gemspec 32 gem sources -a http://gems.github.com
33 sudo gem install josevalim-localized_templates
34
35 In RAILS_ROOT/config/environment.rb:
36
37 config.gem "josevalim-localized_templates", :lib => "localized_templates", :source => "http://gems.github.com"
38
39 If you want it as plugin, just do:
40
e16fb5f8 » josevalim 2009-02-05 Rails 2.3 compatible version! 41 script/plugin install git://github.com/josevalim/localized_templates.git
d7a817bf » josevalim 2008-09-10 First commit 42
e16fb5f8 » josevalim 2009-02-05 Rails 2.3 compatible version! 43 If you are running on Rails 2.2, you should use version 0.3.1:
d7a817bf » josevalim 2008-09-10 First commit 44
e16fb5f8 » josevalim 2009-02-05 Rails 2.3 compatible version! 45 cd myapp
46 git clone git://github.com/josevalim/localized_tempaltes.git
47 cd vendor/plugins/localized_templates
48 git checkout v0.3.1
49 rm -rf ./.git
d7a817bf » josevalim 2008-09-10 First commit 50
51
52 Bugs and Feedback
53 =================
54
2a52a6f7 » josevalim 2009-01-30 Update README and Rakefile. 55 If you discover any bugs, please send an e-mail to jose.valim@gmail.com
56 If you just want to give some positive feedback or drop a line, that's fine too! =)
57
58 Copyright (c) 2009 José Valim
59 http://www.pagestacker.com/
60 http://josevalim.blogspot.com/