0

I have a custom module which response to a URL like this:

https://example.com/uri-in-english

It's a multi-language store so I need to set another frontName with an equivalent URL. For example:

https://example.com/uri-in-spanish

Both URLs must return the same, in their corresponding language. How can I do that?

The config.xml is the following:

<config>
    <modules>
        <Custom_Module>
            <version>1.0</version>
        </Custom_Module>
    </modules>
    <frontend>
        <routers>
            <custom_module>
                <use>standard</use>
                <args>
                    <module>Custom_Module</module>
                    <frontName>uri-in-english</frontName>
                </args>
            </custom_module>
        </routers>
        <layout>
            <updates>
                <custom_module>
                    <file>custom_module.xml</file>
                </custom_module>
            </updates>
        </layout>
        <translate>
            <modules>
            <custom_module>
                <files>
                    <default>Custom_Module.csv</default>
                </files>
            </custom_module>
            </modules>
        </translate>
    </frontend>
    <global>
        <helpers>
            <custom_module>
                <class>Custom_Module_Helper</class>
            </custom_module>
        </helpers>
        <blocks>
            <custom_module>
                <class>Custom_Module_Block</class>
            </custom_module>
        </blocks>
    </global>
</config>

An the IndexController.php is:

<?php

class Custom_Module_IndexController extends Mage_Core_Controller_Front_Action
{

    public function indexAction()
    {
        $this->loadLayout();
        $this->renderLayout();
    }

}

Your Answer

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

Browse other questions tagged or ask your own question.