1

Stores:

  • automobile
  • truck

Languages:

  • 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

Problem
I can 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.

3
  • use full store url or create rewrite with language path, so your shop base url example.com/de/
    – MagenX
    Commented Mar 25, 2018 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
    Commented Mar 25, 2018 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
    Commented Mar 25, 2018 at 20:58

0

Your Answer

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