Question

I have a multi language web, and I need to redirect from the controller to the actual language of the web.

So $this->_redirectURL('/foo/'); now is redirecting to example.com/foo/ but I need to redirect to example.com/en/foo/

How to introduce the code language in the url redirection?

Was it helpful?

Solution

Try this:

$url = Mage::getUrl('', array('_direct'=>'foo'));
$this->_redirectUrl($url);
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top