将英语 URL 转换为西班牙语 URL

Convert English URL to Spanish URL

我需要将英语 URL 转换为西班牙语 URL。我试过 URL 重写管理,但这对我没有帮助。 以下 URL 将展示如何 URL 重写。

http://blog.beetleweb.com/2012/10/creating-custom-magento-url-rewrites/

我的objective是转换 URL

www.example.com/customer/account/create

www.example.com/cliente/cuenta/crear

我是否必须为此创建一个新商店,或者这可以在不创建商店的情况下完成?

Magento 解决方案:

(以下代码未经测试,只是初步的解决方法)

Create a custom module for rewrite Magento customer URL.

In your app/local/MyNameSpace/MyModule/etc/config.xml, you can have something like this :

<frontend>
    <routers>
        <customer>
            <use>standard</use>
            <args>
            <mynamespace_mymodule before="Mage_Customer">MyNameSpace_MyModule</mynamespace_mymodule>
                <frontName>cliente</frontName>
            </args>
        </customer>
    </routers>
<frontend>

Apache2 解决方案:

(以下代码未经测试,只是初步的解决方法)

Use Apache2 rewrite url rules, in .htaccess file in root directory for example.

Your .htaccess file seems like something like this :

RewriteEngine on
RewriteRule ^/customer/([a-z0-9\-]+)$ /cliente/ [L]