Skip to content
Advertisement

zf2 change language dynamically

I have one question, about ZF2 Translator, in the specific case in the costruction the link for change langauge dunamically when user click on flag or menu link.

In My Application/config/module.config.php i have this code:

JavaScript

and my route is:

JavaScript

And in my Application/Module.php i set this code on bootstrap:

JavaScript

now my route http://www.xxxx.com/it/index or http://www.xxxx.com/it/company but i can’t create a link in my view for change language in my application…

How do i proceed ?

Thanks

Advertisement

Answer

You can create a link to the same page you are in by changing only the lang parameter like the following:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement