This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
yar (author)
Fri Feb 06 16:00:59 -0800 2009
commit a35b493c75e321365d04ffa361c5fbf3e54fafd0
tree 361c4c75a18a98a7fc54ea8a0eb8520011c8253c
parent 50eb91f0e5f6533f7ef76e6b6e5682715ff649ba
tree 361c4c75a18a98a7fc54ea8a0eb8520011c8253c
parent 50eb91f0e5f6533f7ef76e6b6e5682715ff649ba
| name | age | message | |
|---|---|---|---|
| |
README.rdoc | ||
| |
init.rb | ||
| |
lib/ |
README.rdoc
Set of i18n helper methods compatible with Simple Localization
Simple Localization was a popular i18n plugin for Rails in pre-2.2 era. One of its killer features that competitors lacked was support for deeply nested namespaces which helped keep the translations organized. Unfortunately, the author announced the end of development of that plugin in October 2008.
Here you can see a small plugin that recreates the neat helper methods of Simple Localization for the Rails-2.2+ built-in i18n engine.
Precisely:
| ll(:my_phrase, :macro_one => "Qwerty", :macro_two => "Azerty"): | translation for the key :my_phrase with two macro substitutions |
| ll(:foo, :bar, :qux): | translation for the key :qux in namespace foo.bar |
| lc(:qux): | translation for the key :qux in namespace pages.index if the current controller is pages and the current action is index |
| l_scope(:foo, :bar): | creates a block with namespace foo.bar. All ll() and lc() calls inside are adjusted to use this namespace (in addition to root or automatically-calculated one) |
| lnc(): | like ll(), but ignores the surrounding l_scope(), always starting from the root namespace |
Please see i18n_db_admin for usage example.








