cancel
Showing results for 
Search instead for 
Did you mean: 

URL Rewrite with switcher languages

SOLVED

URL Rewrite with switcher languages

Hello,

 

I added a French story to my magento 2 and my default is the English story.

When I switch between languages, I have this URL:

url_of_mymagento2/?__store=default

url_of_mymagento2?__store=french

I want something like

url_of_mymagento2/fr

 

Any help please?

Thanks in advance..

1 ACCEPTED SOLUTION

Accepted Solutions

Re: URL Rewrite with switcher languages

Hi @sanaamini,

 

Maybe the easiest way is to the the store codes to the URL?

 

Área de trabajo 1_004.png

 

 

 

View solution in original post

5 REPLIES 5

Re: URL Rewrite with switcher languages

Hi @sanaamini,

 

Maybe the easiest way is to the the store codes to the URL?

 

Área de trabajo 1_004.png

 

 

 

Re: URL Rewrite with switcher languages

Thank you @damian

Re: URL Rewrite with switcher languages

Yes, store codes are the best solution here. They are set while creating the store views and here is the article on how you can add store codes to the URLs:

https://magefan.com/blog/magento-2-adding-store-codes-to-the-urls

Re: URL Rewrite with switcher languages

Re: URL Rewrite with switcher languages

Yes. it is better to use them in case you want to have more SEO friendly URLs. 

 

Example from the original question:

NOT url_of_mymagento2?__store=french

BUT url_of_mymagento2/fr