- automobile
- truck

- German
- English

StoreViews Codes:
- automobile German: auto
- automobile English: car
- truck German: laster
- truck English: truck

Desired urls:
- automobile German: example.com/de/auto
- automobile English: example.com/en/car
- truck German: example.com/de/laster
- truck English: example.com/en/truck

I am able to get the store view code in the url but I am not able to get the language tag in the url. How can I build the aforementioned urls in Magento 2?

Edit: From my point of view, this is not a duplicate since I don't want to have multiple websites. I want one website and multiple stores with store codes in the url AND the language tag in the url.

  • use full store url or create rewrite with language path, so your shop base url example.com/de/ – MagenX Mar 25 '18 at 19:22
  • What exactly do you mean? If I change the base url to example.com/de/ in the store view config I get a 404 ... I already tried this... – Jens Mar 25 '18 at 19:26
  • you have to use both store code in server config and rewrite. devdocs.magento.com/guides/v2.2/config-guide/multi-site/… – MagenX Mar 25 '18 at 20:58

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.