T
T
TigerM2015-10-22 12:29:23
Internationalization and localization
TigerM, 2015-10-22 12:29:23

What should be the correct implementation of multilingualism on the site?

There was a task - to implement several languages ​​on the site. The ability to add languages ​​dynamically is secondary.
I just can’t figure out how to store the translated information in the database and how to correctly transfer it from there to views.
On its own, I went as far as storing the locale in the session. But how to transfer the data to representation did not understand. Something tells me that stamping vyuhi depending on the language is not an option.
I thought of storing translations as additional fields in tables with the "??_" prefix (where ?? is the locale) and, depending on the language, substituting the data into variables. But for this you will have to create shared variables, and not use the collections built into the framework. Is it correct?
I am using laravel.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Io, 2015-10-22
@vawsan

Collect translations from the database, form a model, push it into the view.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question