I'm using TYPO3 9 LTS's CommandController infrastructure for preparing a "batch script" which will update a bunch of pages and content elements in my TYPO3 installation. For these updates I'm levaraging TYPO3's DataHandler.
My TYPO3 installation has German (canonical) and English localizations for pages and content elements, and these pages and content elements are in connected mode, i.e., an English content element is connected to its "original" German content element.
I know the UIDs of the German and English content elements I want to update, but to keep things concise in my script, I thought it should be enough to just reference the "canonical" German content element UIDs, and programmatically derive their English localization counterpart UIDs.
Is there a TYPO3 PHP API for getting translated content element's UID by providing the original content element UID?
E.g., I'm looking for something like
$languageIdDe = 0; // in my installation/site, German language has languageId: '0'
$languageIdEn = 1; // in my installation/site, English language has languageId: '1'
$originalContentElementUidDe = 1234;
$translatedContentElementUidEn = ContentElementTranslationUtil::getTranslatedContentElementUid($originalContentElementUidDe, $languageIdEn);