I have managed to make my URL i18n
compliant using Zend_Controller_Router
.
Ie:
en/user/login
becomes fr/utilisateur/connexion
and both URLs go to the same controller
/action
.
The problem I am facing is the following
I have a language switcher that is displayed as follow :
Français
English
Italiano
etc.
The currently active language doesn't have an anchor
tag, but all others do.
For the languages that have an anchor
on them I am building the URL and I want them to be translated in their specific languages.
Currently if I am in French
all the urls get builded in french, even if I set the @local
key as a param in the URL view helper (tried "@locale" => 'en'
, "@locale" => new Zend_Locale('en')
)
en/utilisateur/connexion
it/utilisateur/connexion
instead of
en/user/login
it/utente/collegamento
because the locale used while building the URL is the one that is defined application wide.
EDIT
I digged a bit deeper in my issue an I found that only the current locale add its resources loaded, which mean I can't get route in the proper language for the route to be built in the right language
My new issue is : how do I load multiple language translation resources?
(I am planning to implement cache in the far future (near release), so I might get better performances)