'How to properly set up subfolders for each language and not break plugins?

We are launching a Shopware 6 website and want to acomplish the following URL strucutre:

https://example.com/de -> German Language https://example.com/en -> English Language

We currently have tree entries in the the Storefront's domain configuration:

Storefront configuration

The problem here is, that the language switcher always defaults to the shortest (?) URL when switching stores, i.e. when switching from EN to DE, it picks https://example.com instead of https://example.com/de.

We have the entry (1) in the domain configuration, because without it, plugins break (they cannot properly generate their API URLs anymore).

Is this a problem in the plugins and should it be possible to just delete (1) or are we supposed to make the configuration differently?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source