42 $languageIconTitles = array();
44 if (preg_match(
'/\\.gif$/', $modSharedTSconfig[
'properties'][
'defaultLanguageFlag'])) {
45 $modSharedTSconfig[
'properties'][
'defaultLanguageFlag'] = str_replace(
'.gif',
'', $modSharedTSconfig[
'properties'][
'defaultLanguageFlag']);
47 $languageIconTitles[0] = array(
49 'title' => strlen($modSharedTSconfig[
'properties'][
'defaultLanguageLabel']) ? $modSharedTSconfig[
'properties'][
'defaultLanguageLabel'] .
' (' .
$GLOBALS[
'LANG']->sl(
'LLL:EXT:lang/locallang_mod_web_list.xlf:defaultLanguage') .
')' :
$GLOBALS[
'LANG']->sl(
'LLL:EXT:lang/locallang_mod_web_list.xlf:defaultLanguage'),
51 'flagIcon' => strlen($modSharedTSconfig[
'properties'][
'defaultLanguageFlag']) ?
'flags-' . $modSharedTSconfig[
'properties'][
'defaultLanguageFlag'] :
'empty-empty' 54 $languageIconTitles[-1] = array(
56 'title' =>
$GLOBALS[
'LANG']->getLL(
'multipleLanguages'),
58 'flagIcon' =>
'flags-multiple' 61 $sys_languages =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetRows(
'*',
'sys_language',
'');
62 foreach ($sys_languages as $row) {
63 $languageIconTitles[$row[
'uid']] = $row;
64 if ($row[
'static_lang_isocode'] && \
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded(
'static_info_tables')) {
65 $staticLangRow = BackendUtility::getRecord(
'static_languages', $row[
'static_lang_isocode'],
'lg_iso_2');
66 if ($staticLangRow[
'lg_iso_2']) {
67 $languageIconTitles[$row[
'uid']][
'ISOcode'] = $staticLangRow[
'lg_iso_2'];
70 if (strlen($row[
'flag'])) {
74 return $languageIconTitles;
89 public function translationInfo($table,
$uid, $sys_language_uid = 0, $row = NULL, $selFieldList =
'') {
97 if ($trTable !== $table || $row[
$GLOBALS[
'TCA'][$table][
'ctrl'][
'languageField']] <= 0) {
98 if ($trTable !== $table || $row[
$GLOBALS[
'TCA'][$table][
'ctrl'][
'transOrigPointerField']] == 0) {
100 $translationsTemp =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetRows($selFieldList ? $selFieldList :
'uid,' .
$GLOBALS[
'TCA'][$trTable][
'ctrl'][
'languageField'], $trTable,
$GLOBALS[
'TCA'][$trTable][
'ctrl'][
'transOrigPointerField'] .
'=' . (
int)
$uid .
' AND pid=' . (
int)($table ===
'pages' ? $row[
'uid'] : $row[
'pid']) .
' AND ' .
$GLOBALS[
'TCA'][$trTable][
'ctrl'][
'languageField'] . (!$sys_language_uid ?
'>0' :
'=' . (
int)$sys_language_uid) .
BackendUtility::deleteClause($trTable) .
BackendUtility::versioningPlaceholderClause($trTable));
101 $translations = array();
102 $translations_errors = array();
103 foreach ($translationsTemp as $r) {
104 if (!isset($translations[$r[
$GLOBALS[
'TCA'][$trTable][
'ctrl'][
'languageField']]])) {
105 $translations[$r[
$GLOBALS[
'TCA'][$trTable][
'ctrl'][
'languageField']]] = $r;
107 $translations_errors[$r[
$GLOBALS[
'TCA'][$trTable][
'ctrl'][
'languageField']]][] = $r;
113 'CType' => $row[
'CType'],
114 'sys_language_uid' => $row[
$GLOBALS[
'TCA'][$table][
'ctrl'][
'languageField']],
115 'translation_table' => $trTable,
116 'translations' => $translations,
117 'excessive_translations' => $translations_errors
120 return 'Record "' . $table .
'_' .
$uid .
'" seems to be a translation already (has a relation to record "' . $row[
$GLOBALS[
'TCA'][$table][
'ctrl'][
'transOrigPointerField']] .
'")';
123 return 'Record "' . $table .
'_' .
$uid .
'" seems to be a translation already (has a language value "' . $row[
$GLOBALS[
'TCA'][$table][
'ctrl'][
'languageField']] .
'", relation to record "' . $row[
$GLOBALS[
'TCA'][$table][
'ctrl'][
'transOrigPointerField']] .
'")';
126 return 'Translation is not supported for this table!';
129 return 'Record "' . $table .
'_' .
$uid .
'" was not found';
132 return 'No table "' . $table .
'" or no UID value';
155 return $GLOBALS[
'TCA'][$table][
'ctrl'][
'languageField'] &&
$GLOBALS[
'TCA'][$table][
'ctrl'][
'transOrigPointerField'] && !
$GLOBALS[
'TCA'][$table][
'ctrl'][
'transOrigPointerTable'];
166 $trTable =
$GLOBALS[
'TCA'][$table][
'ctrl'][
'transForeignTable'];
167 if ($trTable &&
$GLOBALS[
'TCA'][$trTable] &&
$GLOBALS[
'TCA'][$trTable][
'ctrl'][
'languageField'] &&
$GLOBALS[
'TCA'][$trTable][
'ctrl'][
'transOrigPointerField'] &&
$GLOBALS[
'TCA'][$trTable][
'ctrl'][
'transOrigPointerTable'] === $table) {
isTranslationInOwnTable($table)
static getRecordWSOL($table, $uid, $fields=' *', $where='', $useDeleteClause=TRUE, $unsetMovePointers=FALSE)
static getModTSconfig($id, $TSref)
getTranslationTable($table)
static mapRecordTypeToSpriteIconName($table, array $row)
translationInfo($table, $uid, $sys_language_uid=0, $row=NULL, $selFieldList='')
foreignTranslationTable($table)
static versioningPlaceholderClause($table)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
getSystemLanguages($page_id=0, $backPath='')
static deleteClause($table, $tableAlias='')