Answer the question
In order to leave comments, you need to log in
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
Collect translations from the database, form a model, push it into the view.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question