Project

General

Profile

Feature #23519 ยป rfc15668_v2.diff

Administrator Admin, 2010-11-02 14:25

View differences:

t3lib/class.t3lib_recordlist.php (Arbeitskopie)
* @return string Language icon
*/
function languageFlag($sys_language_uid) {
return ($this->languageIconTitles[$sys_language_uid]['flagIcon'] ? '<img src="'.$this->languageIconTitles[$sys_language_uid]['flagIcon'].'" class="absmiddle" alt="" />&nbsp;' : '').
return ($this->languageIconTitles[$sys_language_uid]['flagIcon'] ? t3lib_iconWorks::getSpriteIcon($this->languageIconTitles[$sys_language_uid]['flagIcon']) . '&nbsp;' : '') .
htmlspecialchars($this->languageIconTitles[$sys_language_uid]['title']);
}
t3lib/class.t3lib_transl8tools.php (Arbeitskopie)
function getSystemLanguages($page_id=0,$backPath='') {
global $TCA,$LANG;
// Icons and language titles:
t3lib_div::loadTCA('sys_language');
$flagAbsPath = t3lib_div::getFileAbsFileName($TCA['sys_language']['columns']['flag']['config']['fileFolder']);
$flagIconPath = $backPath.'../'.substr($flagAbsPath, strlen(PATH_site));
$modSharedTSconfig = t3lib_BEfunc::getModTSconfig($page_id, 'mod.SHARED');
$languageIconTitles = array();
// Set default:
// falback "old iconstyles"
if (($pos = strrpos($modSharedTSconfig['properties']['defaultLanguageFlag'], '.')) !== FALSE) {
$modSharedTSconfig['properties']['defaultLanguageFlag'] = substr($modSharedTSconfig['properties']['defaultLanguageFlag'], 0, - $pos);
}
$languageIconTitles[0] = array(
'uid' => 0,
'title' => strlen ($modSharedTSconfig['properties']['defaultLanguageLabel']) ? $modSharedTSconfig['properties']['defaultLanguageLabel'].' ('.$LANG->getLL('defaultLanguage').')' : $LANG->getLL('defaultLanguage'),
'title' => strlen ($modSharedTSconfig['properties']['defaultLanguageLabel']) ? $modSharedTSconfig['properties']['defaultLanguageLabel'].' ('.$LANG->sL('LLL:EXT:lang/locallang_general.xml:defaultLanguage').')' : $LANG->sL('LLL:EXT:lang/locallang_general.xml:defaultLanguage'),
'ISOcode' => 'DEF',
'flagIcon' => strlen($modSharedTSconfig['properties']['defaultLanguageFlag']) && @is_file($flagAbsPath.$modSharedTSconfig['properties']['defaultLanguageFlag']) ? $flagIconPath.$modSharedTSconfig['properties']['defaultLanguageFlag'] : null,
'flagIcon' => strlen($modSharedTSconfig['properties']['defaultLanguageFlag']) ? $modSharedTSconfig['properties']['defaultLanguageFlag'] : 'empty-empty',
);
// Set "All" language:
......
'uid' => -1,
'title' => $LANG->getLL('multipleLanguages'),
'ISOcode' => 'DEF',
'flagIcon' => $flagIconPath.'multi-language.gif',
'flagIcon' => 'flags-multiple',
);
// Find all system languages:
......
}
}
if (strlen ($row['flag'])) {
$languageIconTitles[$row['uid']]['flagIcon'] = @is_file($flagAbsPath.$row['flag']) ? $flagIconPath.$row['flag'] : '';
$languageIconTitles[$row['uid']]['flagIcon'] = t3lib_iconWorks::mapRecordTypeToSpriteIconName('sys_language', $row);
}
}
t3lib/class.t3lib_befunc.php (Arbeitskopie)
* @return array Array with languages
*/
public static function getSystemLanguages() {
// Initialize, add default language:
$languages = t3lib_div::makeInstance('t3lib_transl8tools')->getSystemLanguages();
$sysLanguages = array();
$sysLanguages[] = array('Default language', 0);
// Traverse languages
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,title,flag', 'sys_language', 'pid=0' . self::deleteClause('sys_language'));
while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$sysLanguages[] = array(
htmlspecialchars($row['title']) . ' [' . $row['uid'] . ']',
$row['uid'],
($row['flag'] ? 'flags/' . $row['flag'] : '')
);
foreach ($languages as $language) {
if($language['uid'] !== -1) {
$sysLanguages[] = array(
0 => $language['title'],
1 => $language['uid'],
2 => $language['flagIcon']
);
}
}
$GLOBALS['TYPO3_DB']->sql_free_result($res);
return $sysLanguages;
}
typo3/alt_doc.php (Arbeitskopie)
global $LANG;
$modSharedTSconfig = t3lib_BEfunc::getModTSconfig($id, 'mod.SHARED');
// fallback non sprite-configuration
if (($pos = strrpos($modSharedTSconfig['properties']['defaultLanguageFlag'], '.')) !== FALSE) {
$modSharedTSconfig['properties']['defaultLanguageFlag'] = substr($modSharedTSconfig['properties']['defaultLanguageFlag'], 0, - $pos);
}
$languages = array(
0 => array(
typo3/sysext/lang/locallang_general.xml (Arbeitskopie)
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="defaultLanguage">default Language</label>
<label index="LGL.endtime">Stop:</label>
<label index="LGL.hidden">Hide:</label>
<label index="LGL.starttime">Start:</label>
    (1-1/1)