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

Compare with Current View Page History

« Previous Version 10 Next »

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.

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


The Translations (sys_translation) table stores translations for fields with the Translated Text field type.

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