T
T
Terroris3372021-01-22 23:20:56
Laravel
Terroris337, 2021-01-22 23:20:56

How to implement localization of dynamic data?

Good day, I'm trying to write a multilingual online store on Laravel and ran into a problem with translating dynamically generated data. For example, the admin panel has CRUD products, the site has a language switcher, when switching products, they must also be translated (like all other texts on the site), I translate static data using the built-in Laravel functionality, but how to implement the translation of products (name, description and etc)? It seems to be inconvenient to force you to enter product data in several languages, since there can be 5,10,20 languages.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2021-01-23
@Terroris337

It seems to be inconvenient to force you to enter product data in several languages, since there can be 5,10,20 languages.

Otherwise, no way. You can try the Translators API for machine translation. But the result will be the same. About the level of Ali-Express.
And in any case, you need to organize the storage of all versions of the translation, you won’t pull the external api for each request.
To organize translations, you can find ready-made packages, something according to the " laravel multilanguage model "

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question