Articles must be in the database in three languages.
How about designing a database, do I need to keep a list of supported languages ββin a separate table, do I need to use a plugin (if yes, which one?), Or do I get away with Laravel features?
Articles must be in the database in three languages.
How about designing a database, do I need to keep a list of supported languages ββin a separate table, do I need to use a plugin (if yes, which one?), Or do I get away with Laravel features?
The question is quite general, since we do not know whether it is necessary to envisage the addition of other languages ββin the future, etc.
Laravel out of the box provides localization of static data, so all static blocks can be implemented using it.
As for the dynamic data, for the articles I propose the following structure:
article_id and language_id fields.Regarding the localization of the site I found a universal solution.
In the CRUD or Observer, we prescribe the logic of cache invalidation and caching.
You can try to use the following packages, already used in other projects, a fairly simple implementation.
In a separate table https://github.com/dimsav/laravel-translatable
Source: https://ru.stackoverflow.com/questions/913842/
All Articles