dachcom-digital / pimcore-i18n

Pimcore - i18n Manager
Other
28 stars 18 forks source link

Single domain setup with multiple locales #121

Closed studio1gmbh-pimcore closed 1 year ago

studio1gmbh-pimcore commented 1 year ago

In Pimcore projects we often have a setup similar like this, just like in the pimcore demo:

image

If we install the bundle in such a projects we run into errors like this. The language is setup properly and defintion of zones are not possible, since we use no sites. image image

I've read all the documentation but either I don't understand it or I'm lacking some other important part.


The goal in this setup also is to strip the locale fragment of the url in the default language (domain.com/de/seite1 should be domain.com/seite1).

It seems that this could be possible with i18n: https://github.com/dachcom-digital/pimcore-i18n/blob/659498a45c4e5eb1901d1d9e74c8fab8ad68c380/docs/91_StaticRoutes.md?plain=1#L143-L148

But at another point we have the following conflicting convention in the docs: https://github.com/dachcom-digital/pimcore-i18n/blob/659498a45c4e5eb1901d1d9e74c8fab8ad68c380/docs/26_Languages.md?plain=1#L11


Can you please confirm if such setup is possible with i18n or not?

Thanks in advance! 😊

studio1gmbh-pimcore commented 1 year ago

@solverat 🏓 short feedback would be highly appreciated. Thank you.

solverat commented 1 year ago

Hey @studio1gmbh-pimcore.

Yes, the setup you've described, is not possible with i18n.

While it is true, that you're able to use it without the locale fragment, you're not allowed to mix them.

So either

If you're able to change your setup (using a locale fragment in your routes all the time), i18n is the right tool for you.

studio1gmbh-pimcore commented 1 year ago

@solverat thanks for clarify!

For single domain environments we commited us to use the following solution:

Once setup, i18n works like a charm.

solverat commented 1 year ago

Awesome, glad to hear!