Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.
translationSource
translationSource
-
- Type
- string (field name)
- Path
- $GLOBALS['TCA'][$table]['ctrl']
- Scope
- Proc. / Display
Name of the field, by convention l10n_source is used by translations to point back to the original record (i.e. the record in any language from which they are a translated).
This property is similar to transOrigPointerField. Both fields only contain valid record uids (and not 0), if the record is a translation (connected mode), and not a copy (free mode). In connected mode, while "transOrigPointerField" always contains the uid of the default language record, this field contains the uid of the record the translation was created from.
For example, if a tt_content record in default language English with uid 13 exists, this record is translated to French with uid 17, and the Danish translation is later created based on the French translation, then the Danish translation has uid 13 set as
l10n_
and 17 asparent l10n_
.source
Example
<?php
return [
'ctrl' => [
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'languageField' => 'sys_language_uid',
'translationSource' => 'l10n_source',
// ...
],
'columns' => [
'sys_language_uid' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
'config' => [
'type' => 'language',
],
],
'l10n_parent' => [
'displayCond' => 'FIELD:sys_language_uid:>:0',
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
[
'',
0,
],
],
'foreign_table' => 'tx_myextension_domain_model_something',
'foreign_table_where' =>
'AND {#tx_myextension_domain_model_something}.{#pid}=###CURRENT_PID###'
. ' AND {#tx_myextension_domain_model_something}.{#sys_language_uid} IN (-1,0)',
'default' => 0,
],
],
'l10n_source' => [
'config' => [
'type' => 'passthrough',
],
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough',
'default' => '',
],
],
// ...
],
];