---
title: "Extbase Übersetzung Relationen TYPO3 6.2"
url: "https://www.typo3.net/d/118365-extbase-uebersetzung-relationen-typo3-62"
source: "typo3.net"
tags: ["Extensions","Entwicklung","Extbase","Frage","TCA"]
created: "2014-07-05"
last_reply: "2014-07-11"
replies: 3
solved: false
page: 1
pages: 1
lang: "de"
---

# Extbase Übersetzung Relationen TYPO3 6.2

Extensions › Entwicklung · 3 Antworten · gestartet 2014-07-05

## Eröffnungsbeitrag

**tanseb** · 2014-07-05 · [Beitrag #1](https://www.typo3.net/d/118365-extbase-uebersetzung-relationen-typo3-62/1)

Hi ich entwickle gerade eine Extension. Und habe folgendes Problem:
Wenn ich von einem Datensatz eine Übersetzung anlege, so werden auch die Relationen in den Übersetzten Datensatz übernommen. -> was ja auch gut ist.
Problem:
Wenn ich nun aber am Originaldatensatz die Zuordnung in den Relationen ändere, so werden die Änderungen im Übersetzten Datensatz nicht aktualisiert -> sprich die Relationen sind immernoch die gleichen wie zu dem Zeitpunkt als der Datensatz das erste mal übersetzt worden ist. Man müsste quasi den übersetzten Datensatz wieder Löschen und nochmals übersetzen, damit die Realtionen wieder stimmen.

Gibt es die Möglichkeit bestimmte Felder wie beispielsweise die Zuordnung zu anderen Objekten aus dem Originaldatensatz zu übernehmen (quasi wie ein Binding)?

Hier noch ein kleines "Schaubild"

Datensatz A
-Kategorie 1
-Kategorie 2

->Datensatz A übersetzen führt zu

Datensatz A (EN)
-> Kategorie 1
-> Kategorie 2

-> Datensatz A ändern führt zu
Datensatz A
-Kategorie 1
-Kategorie 2
-Kategorie 3

-> Datensatz A EN nach Änderung von Datensatz A anzeigen führt zu
Datensatz A (EN)
-Kategorie 1
-Kategorie 2

Ziel:
-> Datensatz A EN nach Änderung von Datensatz A anzeigen führt zu
Datensatz A (EN)
-Kategorie 1
-Kategorie 2
-Kategorie 3

hoffe ich konnte das Problem plausibel darstellen und freue mich auf Lösungsvorschläge

Grüße,
Sebastian

## Antworten

### [#2](https://www.typo3.net/d/118365-extbase-uebersetzung-relationen-typo3-62/2) · aemka · 2014-07-07

Welche TCA Settings nutzt du? Hast du die TCA Doku schon mal in diesem Punkt genau durchgelesen?

### [#3](https://www.typo3.net/d/118365-extbase-uebersetzung-relationen-typo3-62/3) · tanseb · 2014-07-08

Hi,
in meiner "Casestudy.php sieht das TCA setting so aus:"

'categories' => array(
      'exclude' => 1,
      //'l10n_mode' => 'exclude',
      'label' => 'LLL:EXT:tancasestudies/Resources/Private/Language/locallang_db.xlf:tx_tancasestudies_domain_model_casestudy.categories',
      'config' => array(
        'type' => 'select',
        'foreign_table' => 'tx_tancasestudies_domain_model_category',
        'foreign_table_where' => ' AND (tx_tancasestudies_domain_model_category.sys_language_uid = 0 OR tx_tancasestudies_domain_model_category.l10n_parent = 0)',
        //'foreign_table_where' => ' AND  tx_tancasestudies_domain_model_category.sys_language_uid = 0',
        'MM' => 'tx_tancasestudies_casestudy_category_mm',
        'MM_opposite_field' => 'categories',
        'size' => 10,
        'autoSizeMax' => 30,
        'maxitems' => 9999,
        'multiple' => 0,
        'wizards' => array(
          '_PADDING' => 1,
          '_VERTICAL' => 1,
          'edit' => array(
            'type' => 'popup',
            'title' => 'Edit',
            'script' => 'wizard_edit.php',
            'icon' => 'edit2.gif',
            'popup_onlyOpenIfSelected' => 1,
            'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
            ),
          'add' => Array(
            'type' => 'script',
            'title' => 'Create new',
            'icon' => 'add.gif',
            'params' => array(
              'table' => 'tx_tancasestudies_domain_model_category',
              'pid' => '###CURRENT_PID###',
              'setValue' => 'prepend'
              ),
            'script' => 'wizard_add.php',
          ),
        ),
      ),
    ),

in meiner Category.php sieht das TCA so aus:

'casestudies' => array(
      'exclude' => 1,
      'l10n_mode' => 'exclude',
      'label' => 'LLL:EXT:tancasestudies/Resources/Private/Language/locallang_db.xlf:tx_tancasestudies_domain_model_category.casestudies',
      'config' => array(
        'type' => 'select',
        'foreign_table' => 'tx_tancasestudies_domain_model_casestudy',
        'foreign_table_where' => 'AND tx_tancasestudies_domain_model_casestudy.sys_language_uid = 0',
        'MM' => 'tx_tancasestudies_casestudy_category_mm',
        'size' => 10,
        'autoSizeMax' => 30,
        'maxitems' => 9999,
        'multiple' => 0,
        'wizards' => array(
          '_PADDING' => 1,
          '_VERTICAL' => 1,
          'edit' => array(
            'type' => 'popup',
            'title' => 'Edit',
            'script' => 'wizard_edit.php',
            'icon' => 'edit2.gif',
            'popup_onlyOpenIfSelected' => 1,
            'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
            ),
          'add' => Array(
            'type' => 'script',
            'title' => 'Create new',
            'icon' => 'add.gif',
            'params' => array(
              'table' => 'tx_tancasestudies_domain_model_casestudy',
              'pid' => '###CURRENT_PID###',
              'setValue' => 'prepend'
              ),
            'script' => 'wizard_add.php',
          ),
        ),
      ),
    ),

ext_tabels.sql sieht so aus:

#
# Table structure for table 'tx_tancasestudies_domain_model_casestudy'
#
CREATE TABLE tx_tancasestudies_domain_model_casestudy (

uid int(11) NOT NULL auto_increment,
	pid int(11) DEFAULT '0' NOT NULL,

title varchar(255) DEFAULT '' NOT NULL,
	images int(11) unsigned DEFAULT '0',
	description text NOT NULL,
	galleryimages int(11) unsigned DEFAULT '0',
	contactpersons int(11) unsigned DEFAULT '0' NOT NULL,
	categories int(11) unsigned DEFAULT '0' NOT NULL,

tstamp int(11) unsigned DEFAULT '0' NOT NULL,
	crdate int(11) unsigned DEFAULT '0' NOT NULL,
	cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
	deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
	hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
	starttime int(11) unsigned DEFAULT '0' NOT NULL,
	endtime int(11) unsigned DEFAULT '0' NOT NULL,

t3ver_oid int(11) DEFAULT '0' NOT NULL,
	t3ver_id int(11) DEFAULT '0' NOT NULL,
	t3ver_wsid int(11) DEFAULT '0' NOT NULL,
	t3ver_label varchar(255) DEFAULT '' NOT NULL,
	t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
	t3ver_stage int(11) DEFAULT '0' NOT NULL,
	t3ver_count int(11) DEFAULT '0' NOT NULL,
	t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
	t3ver_move_id int(11) DEFAULT '0' NOT NULL,

sys_language_uid int(11) DEFAULT '0' NOT NULL,
	l10n_parent int(11) DEFAULT '0' NOT NULL,
	l10n_diffsource mediumblob,

PRIMARY KEY (uid),
	KEY parent (pid),
	KEY t3ver_oid (t3ver_oid,t3ver_wsid),
 KEY language (l10n_parent,sys_language_uid)

);

#
# Table structure for table 'tx_tancasestudies_domain_model_category'
#
CREATE TABLE tx_tancasestudies_domain_model_category (

uid int(11) NOT NULL auto_increment,
	pid int(11) DEFAULT '0' NOT NULL,

title varchar(255) DEFAULT '' NOT NULL,
	parentcategory varchar(255) DEFAULT '' NOT NULL,
	products int(11) unsigned DEFAULT '0' NOT NULL,
	casestudies int(11) unsigned DEFAULT '0' NOT NULL,

tstamp int(11) unsigned DEFAULT '0' NOT NULL,
	crdate int(11) unsigned DEFAULT '0' NOT NULL,
	cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
	deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
	hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
	starttime int(11) unsigned DEFAULT '0' NOT NULL,
	endtime int(11) unsigned DEFAULT '0' NOT NULL,

t3ver_oid int(11) DEFAULT '0' NOT NULL,
	t3ver_id int(11) DEFAULT '0' NOT NULL,
	t3ver_wsid int(11) DEFAULT '0' NOT NULL,
	t3ver_label varchar(255) DEFAULT '' NOT NULL,
	t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
	t3ver_stage int(11) DEFAULT '0' NOT NULL,
	t3ver_count int(11) DEFAULT '0' NOT NULL,
	t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
	t3ver_move_id int(11) DEFAULT '0' NOT NULL,

sys_language_uid int(11) DEFAULT '0' NOT NULL,
	l10n_parent int(11) DEFAULT '0' NOT NULL,
	l10n_diffsource mediumblob,

PRIMARY KEY (uid),
	KEY parent (pid),
	KEY t3ver_oid (t3ver_oid,t3ver_wsid),
 KEY language (l10n_parent,sys_language_uid)

);

#
# Table structure for table 'tx_tancasestudies_casestudy_category_mm'
#
CREATE TABLE tx_tancasestudies_casestudy_category_mm (
	uid_local int(11) unsigned DEFAULT '0' NOT NULL,
	uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
	sorting int(11) unsigned DEFAULT '0' NOT NULL,
	sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,

KEY uid_local (uid_local),
	KEY uid_foreign (uid_foreign)
);

TCA Doku in diesem Punkt habe ich noch nicht gelesen bzw. diesen Punkt noch nicht gefunden.
Habe mal danach gegoogelt aber noch nichts gefunden.
Hast du einen Tipp für mich oder einen Link?

Danke für deine Antwort

### [#4](https://www.typo3.net/d/118365-extbase-uebersetzung-relationen-typo3-62/4) · tanseb · 2014-07-11

Hab leider noch keine Lösung gefunden hat noch jemand ne idee was falsch ist? sollte das normalerweise gehen?oder muss ich da nen Hook schreiben o.ä.?

---

Quelle: „Extbase Übersetzung Relationen TYPO3 6.2“, typo3.net, https://www.typo3.net/d/118365-extbase-uebersetzung-relationen-typo3-62
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
