B
B
Billy Milligan2016-02-02 10:28:41
Internationalization and localization
Billy Milligan, 2016-02-02 10:28:41

How to make a multilingual website in laravel 5?

I want to make each language in a subdomain like on stackoverflow. How can this be done in laravel?
And how to store posts in the database? I think to make for each language the DB. How can I connect to different databases depending on the subdomain?
Am I thinking right? If not, explain how to raise a multilingual site on laravel.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Andrzej Wielski, 2016-02-02
@Billy_Milligan

How to properly implement database localization in laravel?
Here about localization of a DB.
https://laravel.ru/docs/v5/localization
Here is about the localization of the site itself (strings).

I
igor_alexandrovich_f, 2016-09-17
@igor_alexandrovich_f

Not quite on the topic, but if you need a low-quality but fast auto-translation, then the https://github.com/stevebauman/translation
package will do . We write in the {{_t("text for translation")}} template and when accessing example.com/en /home text will be translated into English. Translation is carried out through the Google website, but you can also configure it through the API.
Translations are stored in the database.

M
Muhammad, 2016-02-02
@muhammad_97

All lines related to the interface - in the localization files , content translation - in the database

S
Stanislav Pochepko, 2016-02-02
@DJZT

There are special packages for content localization.
dimsav/laravel-translatable
themsaid/laravel-multilingual
Basic principle - an additional table is created to store the translation of model strings depending on the language

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question