github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

josevalim / localized_templates

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 55
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (1)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (1)
    • v0.3.1
Sending Request…
Click here to lend your support to: localized_templates and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

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

  cancel

http://blog.plataformatec.com.br/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Update README. 
josevalim (author)
Wed Dec 23 05:15:06 -0800 2009
commit  fdae1892994f9d91dedc9c75296e90574596d0b0
tree    d9c5869e4a58dac73b65c19d1a9f3af51b4eae1a
parent  4280833fa586fd26dacf20cd8c8c8974914815bb
localized_templates /
name age
history
message
file MIT-LICENSE Sat Nov 29 14:29:18 -0800 2008 Added gemspec [josevalim]
file README Wed Dec 23 05:15:06 -0800 2009 Update README. [josevalim]
file Rakefile Fri Jan 30 09:40:12 -0800 2009 Update README and Rakefile. [josevalim]
file init.rb Sun Jan 04 02:47:17 -0800 2009 Bug fix in gem [josevalim]
directory lib/ Tue Mar 31 06:07:59 -0700 2009 Ensure everything works on Rails 2.3.2 [josevalim]
file localized_templates.gemspec Thu Feb 05 10:12:46 -0800 2009 Rails 2.3 compatible version! [josevalim]
directory test/ Thu Feb 05 10:12:46 -0800 2009 Rails 2.3 compatible version! [josevalim]
README
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://blog.plataformatec.com.br/
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server