Url translation

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!
dnll
Posts: 5
Joined: 07 Sep 2020, 16:38

Url translation

Post by dnll » 07 Sep 2020, 17:08

Hello,

I'm a newby to Laravel and Aimeos and I'm using the default demo theme.
I've noticed that the urls are not accorded with the current language. I mean all the urls of the templates get the url to the default language which means that if I click on a product I'm redirected to detail page on the default language instead of the current language.
After some time I found the function url() and overrrided the templates, but it doesn't seem right that this feature is not set by default. Same thing with the search input. Am I missing something or overriding some feature without knowing? Can I override the url() function in to order to set this one time for all urls?

Thanks a lot for your help.

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

Re: Url translation

Post by aimeos » 08 Sep 2020, 15:18

Add a text of type "URL segment" for the languages you use and insert the name of the product in that language:
https://aimeos.org/docs/User_Manual/Adm ... ails#Texts
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

dnll
Posts: 5
Joined: 07 Sep 2020, 16:38

Re: Url translation

Post by dnll » 08 Sep 2020, 15:46

Hello,

Thank you very much for this quick answer but it doesn't resolve the issue.

In bref, on the page 'http://localhost/shop?locale=fr&currency=EUR' all urls are set to the default language instead of french. For exemple 'http://localhost/shop?l_page=2' is missing the 'locale=fr&currency=EUR'.

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

Re: Url translation

Post by aimeos » 08 Sep 2020, 15:52

If you are using multiple locales (and/or currencies), then make sure you add the locale selector and set up routing correctly:
https://aimeos.org/docs/Laravel/Add_loc ... tor#Routes
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

dnll
Posts: 5
Joined: 07 Sep 2020, 16:38

Re: Url translation

Post by dnll » 08 Sep 2020, 16:43

Thank you very much !! It's works perfectly :D

Post Reply