view localization

0 views
Skip to first unread message

Q

unread,
Jul 2, 2008, 8:51:54 AM7/2/08
to Ruby Ireland
hi,

i need to localize my view, i thought that i could use a session
variable and a before filter to change the path or the name of the
view. i tried with view_path but nothing happend.

anybody can help me?

ex:
index.html.erb >>> EN_index.html.erb
or
/account/index.html.erb >>> /account/EN/index.html.erb


cheers

Q

Justin Corry

unread,
Jul 3, 2008, 6:07:23 PM7/3/08
to Ruby Ireland
You can use view_paths to achieve this. However, you should use ".../
app/views/EN/account" not ".../app/views/account/EN". view_paths does
not include the model name.

Justin
Reply all
Reply to author
Forward
0 new messages