B
B
BonBon Slick2017-09-18 15:40:02
Internationalization and localization
BonBon Slick, 2017-09-18 15:40:02

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

1 answer(s)
O
ommunist, 2017-11-09
@BonBonSlick

Be like this https://laravel.com/docs/5.5/localization
Actually, many developers continue to confuse l10n translation and i18N localization.
If your task is translation, not localization, here the comrades solve this issue, yes, otherwise .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question