cancel
Showing results for 
Search instead for 
Did you mean: 

How to translate URL in magento 2?

How to translate URL in magento 2?

Hello everyone,

I read severals post to translate the "customer/account" URL with something else.

I have no idea how to do this for the "controller" account. I mean, If I change routes.xml like this

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="customer" frontName="client">
            <module name="Magento_Customer" />
        </route>
    </router>
</config>

the "customer" part will be changed, but not the account part, or "login" or something else.

 

I tried with marketing / seo admin backoffice, without success.

Thanks for your time,

 

1 REPLY 1

Re: How to translate URL in magento 2?

By default font name is used for a front route of any action.

If you want to change account and login name then you need to create folder under Customer module controller folder,

 

Path is Controller/Account/Login.php

Where customer is frontname for any customer action.

You need to customize for display specific action in url.

Like, "customer/account" in this url customer is frontname where account is Account folder name under Controller/Account and if "customer/account/login" then Controller/Account/Login.php

When third parameter is not passed at that time they will consider index.php as filename.

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial