[TYPO3-mvc] Need resources: create translation of extbase domain object.

Philipp Wrann philippwrann at gmail.com
Mon Aug 31 10:30:21 CEST 2015


In one project i deal with massive synch functionality and import big sets of data several times a day. I created a task for that purpose and do the import-routine using extbase.

Now i need translation support and i dont really find a utility within extbase to retrieve a translated instance of an object that i can simply add to the repository. Is there a possibility that uses all TCA settings for translation handling?

Am i good if i do something like that:

$query = $this->repository->createQuery();
$query->getQuerySettings()->setLanguageUid($sysLanguageUid);
$query->matching($query->equals('uid', $object->getUid()));
$translated = $query->execute()->getFirst();
if ($translated === NULL) {
	$translated = clone $object;
}
$translated->_setProperty('_languageUid',$sysLanguageUid);
$translated->_setProperty('_localizedUid',$translated->getUid());

How do i deal with 1:N & N:M relations?


More information about the TYPO3-project-typo3v4mvc mailing list