First off, Lets clarify :
-Using Magento ver. 2.1.1
-Got a Porto theme
-Only one extension other then the one for the theme: M2E
-Installation on Google cloud

We just got into Magento, fiddle with it a while and now we have something presentable. Except for one thing that really bugs us.
See, I used the store view for the translation, didn't want and find the CMS file. Everything is good from a static page to categories, but when we go to a subcategory and change 'store', the link add-up.

Let's say I got
And switch "store", it will give me the following:
This leaves me with a 404 error of course.

*I'll add that the categories and subcategories have different URL-key from one store to another so that the URL is in french in the French store and English in the English store. This seems to be the problem but the client wants that...

Has anyone got a clue? Don't really know what could I say about which set I got. got 'yes' for putting store code and thing. There's surely something I'm missing right?

  • Did you solve the problem?
    – Mehdi
    May 9, 2017 at 15:38

1 Answer 1


I have a solution for this issue if you are using porto theme for magento 2.X:

you need to go following path and open "languages.phtml"


Find code of line

<a href="<?php echo $_lang->getCurrentUrl(); ?>">

Replace with this

<a href="#" data-post='<?php /* @escapeNotVerified */ echo $block->getTargetStorePostData($_lang); ?>'>

Clear magento cache and check. I hope it will work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.