S
S
Svet Valentin2018-07-31 20:51:13
Laravel
Svet Valentin, 2018-07-31 20:51:13

How to create a multilingual website in Laravel?

Help me understand how to complete the task of creating a multilingual site on Laravel
so that the URL structure is as follows:
1. The base language is EN and in the base language the language is not written in the URL
www.example.com/products/camera
2. When we change the language, the URL structure changes to
www. example.com/ru/product/kamery (Russian)
www.example.com/ro/produse/camere (Romanian)
That is, in the URL we specify the language in all languages ​​except the base one.
Thank you all in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasyl Fomin, 2018-08-01
@walyk

Use this package https://github.com/mcamara/laravel-localization
There you can specify in the config that the default language is not shown in the url, the most convenient and functional for work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question