1

I have multi language website.

In my website, I want to redirect using controller to actual path of the website.

For ex. Currently, I redirect to

www.example.com/testing/

But, I need to redirect like

www.example.com/de/testing/

How to do it?

Anyone please help me.

0

Try to use this code. It maybe helpful to you :

$redirectpath = Mage::getUrl(' ', array('_direct' => 'testing'));

$this->_redirectUrl($redirectpath);
  • 1
    You should really add some context to this answer. For instance, where does this code go? What do you expect it to do? Why should it do that? I expect for from someone with 2K, and you clearly need to brush up on How to write a good answer – mtr.web Apr 18 '18 at 20:09
0

First you Override File

app/design/frontend/base/default/template/page/switch/stores.phtml

After You can need to redirect like.....

Language1 Language2
0

You have to pass store_id in the second parameter to have correct store

Try to use this

echo Mage::getUrl(' ',array('_store'=>1));

where "2" is your store_id

You can find more information

https://magento2.atlassian.net/wiki/spaces/m1wiki/pages/14024861/getUrl+Function+Parameters

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy