Translated text fields allow the same field to display different content based on the user language. In SimpleOne, a special field type named Translated Text was implemented. This field operates the same text field, and it is used all along with the system.
Administrators information
Technically, the English language text is stored in the master table, but the appropriate values of the other languages are stored in the Translations (sys_translation) table. Each translated field on every row has one or more entries in the Translations table, one per every language provided.
The Translated Text table
The Translations (sys_translation) table stores translations for fields with the field type translated_text.
Translated text form fields
Field | Description |
---|---|
column_id | The ID of the column containing translated text. |
record_id | The ID of the record containing translated text. |
language_id | The ID of the language the text translated into. |
value | The displayed translated text. |
The English language text in the master table and the translated text are bound with each other by the column_id and record_id fields; these fields' values are used when looking for the translation of the English language text of the specified field, and if found, it is taken as a translation.
есть таблица sys_translation, и вот у нее все эти колонки.
таблица sys_translation отдельно, тип поля отдельно. Они между собой взаимосвязаны. У некоей таблицы есть поле с типом поля TT, содержимое этого поля дублируется в эту таблицу, причем в зависимости от языка. Грубо говоря, есть UI action, табличка, есть поле name, которая у нас переводится. В табличке UI action, в первой записи, допустим, это будет кнопка Save, у нее name Save, в дефолтной локали, в табличке ui action записывается Save, а в табличку sys_translation для айдишника языка русского записывается Сохранить, а для айдишника языка английского записывается Save.