/** * Creates the localization panel * * @param string $table The table * @param array $row The record for which to make the localization panel. * * @return array */ public function getLocalizedRecords($table, $row) { $records = array(); $translations = $this->translateTools->translationInfo($table, $row['uid'], 0, $row); if (is_array($translations) && is_array($translations['translations'])) { foreach ($translations['translations'] as $sysLanguageUid => $translationData) { if (!$GLOBALS['BE_USER']->checkLanguageAccess($sysLanguageUid)) { continue; } if (isset($translations['translations'][$sysLanguageUid])) { $records[$sysLanguageUid] = array('editIcon' => $this->getLanguageIconLink($sysLanguageUid, BackendUtility::editOnClick('&edit[' . $table . '][' . $translationData['uid'] . ']=edit'), $translationData['uid']), 'uid' => $translations['translations'][$sysLanguageUid]['uid']); } } } return $records; }