I'm trying to implement localized templates in rails 2.1. The background
is I have a large codebase which among other things uses engines plugin,
making it a mess to upgrade to rails 2.3 which includes this. Therefore
I wanted to change the rendering behaviour in rails 2.1 so that it
searches for files like
index.fr.html.erb or /views/fr/base/index.html.erb if Locale.code (using
Globalite) is fr.
First I tried coding a :before_filter in my Application controller and
to add a new search path for views. I couldn't get this to work, it
seems to have no effect.
The Localized Templates plugin by Jose Valim
(http://github.com/josevalim/localized_templates) looks very good, and
seems it must have been coded before rails 2.2 came out (released sep
2008). However I get problems with calls to memoize, and if I remove
those calls, to the _view paths array. Any ideas? (I thought memoize was
rails 2.2 feature..) Alternative ways for localized templates?
This is my first time working inside rails and I'm banging my head
against a wall:p
C:/Documents and Settings/dkleman/My
undefined method `memoize' for ActionView::Base:Class (NoMethodError)
If I remove the calls to memoize I get problems with view_paths array:
ActionView::TemplateError (undefined method `view_paths' for
#<ActionView::Base:0x66a8e38>) on line #7 of