Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lara28580's avatar

Generate correct url with mcamara / laravel-localization on blog posts

I am using the package mcamara/laravel-localization and I am trying to generate correct urls on blog posts. When I change languages from en to de I get the following

//en
http://localhost/en/post/this-is-a-test

to

//de
http://localhost/de/post/this-is-a-test

the de url should be

http://localhost/artikel/das-ist-ein-test

I am using the language switcher which is in the docs https://github.com/mcamara/laravel-localization#creating-a-language-selector

Maybe someone knows what to do ?

0 likes
0 replies

Please or to participate in this conversation.