You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

The Translated Text field is a special field type which provides translations for different content depending on the user locale. This field operates the same text field, and it is used all along with the system.

Administrators information


The English language text and other languages are stored in different tables: the master table – for the English text, the Translations (sys_translation) table – for localization. The Translation table contains several entries of a translated field – one per every language provided.

Please note: when you clear a field of a Translated text type, only the value for current language is deleted. Values for other languages remain where they were. Technically, when you do this, you delete only one record in the Translations (sys_translation) table, without removing others.

The Translated Text table


Translations for fields with the Translated Text field type are saved in the Translations (sys_translation) table.

Translated text form fields

FieldDescription
column_idThe ID of the column containing translated text.
record_idThe ID of the record containing translated text.
language_idThe ID of the language the text translated into.
valueThe displayed translated text.

The English language text in the master table and the translated text are bound with each other by the bundle looking like "column_id-record_id-language_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. The same goes for translations to any other language.

If this condition was failed, you may get a collision during translation update delivery looking like:

Collision
SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "idx-sys_translation-column_id-record_id-language_id"
DETAIL: Key (column_id, record_id, language_id)=(156700061700731765, 156846309008305536, 156628684306541141




  • No labels