transOrigDiffSourceField¶
-
transOrigDiffSourceField
¶ -
- Type
- string (field name)
- Path
- $GLOBALS['TCA'][$table]['ctrl']
- Scope
- Proc. / Display
Changed in version 13.3
The column definition is auto-created.
Column name, by convention l10n_diffsource, which will be updated with the value of the original language record whenever the translation record is updated. This information is later used to compare the current values of the default record with those stored in this field. If they differ, there will be a display in the form of the difference visually. This is a big help for translators so they can quickly grasp the changes that happened to the default language text.
The column in the database is auto created. If you ever override it, it should be at least a large text field (clob/blob). If you do not define the field in the file
ext_tables.sql
it is automatically created with the correct type.The column definition is auto-created. If it is overridden it must still be of type Pass through / virtual field.
Note
Sometimes
l18n_diffsource
is used for this field in Core tables. This has historic reasons.Warning
Columns created automatically by being defined by this property still need to be added manually to the palettes and types definition.
Due to the TCA loading order these columns are only created if the according ctrl property was added in the original definition in
Configuration/TCA/<tablename>.php
, not if they were defined in the overrides likeConfiguration/TCA/Overrides/something.php
.
Example: Display changes in from the original language¶
<?php
return [
'ctrl' => [
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'languageField' => 'sys_language_uid',
'translationSource' => 'l10n_source',
// ...
],
'palettes' => [
'language' => [
'showitem' => '
sys_language_uid,l10n_parent,
',
],
],
'types' => [
0 => [
'showitem' => '
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
[...],
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
--palette--;;language,
',
],
],
];