Question

We have a multistore setup with 3 stores/domains, which should support different languages in the near future and I want to have the locale/language information in store URLs.

Example:

  • website1.com/en/
  • website1.com/fr/
  • website2.com/en/
  • ...

From the (current) technical background I understand that using same code does not work.

Store with the same code already exists.

But it is even not allowed to use uppercase codes to work around ...

The store code may contain only letters (a-z), numbers (0-9) or underscore(_), the first character must be a letter

I could use some "fake" codes, but this is also to limited ...

  • website1.com/en/
  • website2.com/english/
  • website3.com/en_en/

Is there any way to reuse same store? What files have to be adjusted to make this work?

Was it helpful?

Solution

Indeed you cannot use the same code for 2 store views.
And I don't recommend removing the restriction since magento counts on the store view code to be unique.

So I don't think there is a way to have the store codes in the url just by enabling them in the backend.
But you can create actual folders named en, fr and so on and make these folders act as the document root for specific store views.

Here is a detailed explanation on how you can setup multiple websites and store views, each one with its own document root: Multi-website multi-store set-up

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top