Answer the question
In order to leave comments, you need to log in
How to make a project in 2 languages in Yii2?
There will be a project similar to https://ilovetorun.org/
How to properly translate such a project
1. Translation of content that is added through the admin panel
Make additional fields in the table for 2 languages? Or make a separate table where translation records will be added for each field. That is, the table table_name | field_name | language | translate
2. Translation of static texts on pages
For each text, do a translation through Yii::t() or are there any other options?
3. Is it really possible to translate the fact that users enter them in general?
Answer the question
In order to leave comments, you need to log in
1. For content translation I use https://github.com/OmgDef/yii2-multilingual-behavior - main language content in one table, translations of multilingual fields in another table.
There is another solution where only data common to all languages is stored in the main table
: https://github.com/creocoder/yii2-translateable
y.
3. If you mean comments or information in the profile, then this will be superfluous.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question