Answer the question
In order to leave comments, you need to log in
What about the localization of small phrases and large texts?
I'm using the standard Laravel translation set, however, it's only good for words and short phrases.
What to do with long sentences, and even texts?
I imagine it like this, there is a FAQ section, in the questions and answers table, add the lang field. When pulling questions, we take the current language and add the filter where('lang', 'en/ru/ch...'). This is when there are models, and what to do with those who do not have a model. I have created a table where there are 3 fields lang | text | slug , when you need to pull out the text, for example for Privacy Policy, I take it from this table by the slug field. Tooltips, names of inputs and such a trifle where 1-5 words, I use the file system, there are files for pop-ups, and there are translations.
Is it right? I wonder how you do it and which is preferable?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question