Language switching in product detail issue

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Kaizer
Posts: 7
Joined: 10 Mar 2020, 15:13

Re: Language switching in product detail issue

Post by Kaizer » 17 Mar 2020, 00:51

Adding {locale} in routes gives me a 404 error

So I just installed a fresh laravel (6.18.1) and aimeos 2019.10.19 locally with the demo data ... And still the same behavior...

I also tried both changes you mentionned to this fresh install, with no effect (route changes in config/shop.php also lead to 404)

If that helps, here is an example of the issue:
http://blackpage.be/shop/The_Jimi_Unix_ ... rrency=EUR

Here with language already switched to english -> using pretty much any link brings back to default language (fr)

User avatar
aimeos
Administrator
Posts: 7858
Joined: 01 Jan 1970, 00:00

Re: Language switching in product detail issue

Post by aimeos » 17 Mar 2020, 08:16

If you add {locale} to your routes, your URLs will be:
- http://blackpage.be/en/shop/
- http://blackpage.be/fr/shop/

Did you have two entries in the Locale tab? You need these site/locale/currency combinations:
- default/fr/EUR
- default/en/EUR
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Kaizer
Posts: 7
Joined: 10 Mar 2020, 15:13

Re: Language switching in product detail issue

Post by Kaizer » 17 Mar 2020, 13:55

I don't know why I assumed the default language would not change the url...

Adding {locale} was indeed the solution

I feel stupid but very grateful for your support, thanks a lot !

Post Reply