Greetings.
I'm very new with ZF so please excuse any ignorance on my part.
I'm developing a website that must have multiple languages for the user
to choose (namely: en_US, and pt_BR). The idea is having icons present
in all pages that the user can click, resulting in:
1) Change the default locale for him.
2) Rendering the page where he's in again, so he sees that page in the
desired language "automatically".
3) Setting a cookie so the next time he visits the site the correct
locale is already set
Although this might sound pretty straightforward I must confess I'm
completely confused.
The translation works fine in the page's initial load (it loads in
English because my browser's locale is en_US), but it doesn't work after
the redirect. After the user clicks the icon (in this example, the icon
for pt_BR) the page loads without rendering the view and instead of the
translated strings I get only the indexes for the language array
('title', 'phone', 'explain', etc...).
I've also noticed that the cookie is not saved.
Here's how I'm trying to achieve this (this will be simple to show,
since the site has just a front page for now):
app/controllers/IndexController.php - http://paste2.org/p/146862
app/views/scripts/index/index.phtml - http://paste2.org/p/146866
(BTW, the registry is being set in my bootstrap).
Any ideas on what I'm doing wrong?
TIA,
Galvao