V
V
Vasyl Vandych2020-06-15 05:41:16
Laravel
Vasyl Vandych, 2020-06-15 05:41:16

Multilingual URLs for Laravel 5.8?

There is an engine on Laravel 5.8, developers are pulling with updates.
How to implement multilingual urls with language code prefix on laravel 5.8 ?
Now the translation is implemented via json, all phrases are stored in the database.

+ so that when switching the language, it does not redirect to the main page, but remains on the same one and the language and url are updated.

Video many manuals on stackoverflow, and laracast, but there is not clear to the end.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew Hecc, 2020-06-15
@glossyweb

https://github.com/mcamara/laravel-localization
We did localization through this link. There is a very simple, step-by-step installation guide.

+ so that when switching the language, it does not redirect to the main page, but remains on the same one and the language and url are updated.

This thing is fairly easy to write. You get the current url, from it you get a link without a language, and on the switch set the switch to an already full link with the language you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question