[TYPO3] realurl languageMenu
s5.edouard.lauer at cssf.lu
s5.edouard.lauer at cssf.lu
Mon Mar 6 14:13:23 CET 2006
Hallo,
I've configured our website so that realurl nearly works. By nearly I
mean that in the default languagemenu.php for realurl the id's are
translated correctly in every language but not the action. For example
the url:
http://devwww.home.lu/fr/publications/newsletters/select/newsletters-2006.html
gets with languagemenu.php
http://devwww.home.lu/en/publications/newsletters.html
Hereby included the languagemenu.php:
<?php
if (!is_object($this)) die ('Error: No parent object present.');
function get_website_languages($defaultLang) {
$tabLanguage = array();
$where = " hidden = 0 ";
$query = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*',
'sys_language', $where, 'uid') or die(mysql_error());
$numResult = $GLOBALS['TYPO3_DB']->sql_num_rows($query);
if ($numResult > 0) {
if (!empty($defaultLang)) {
$tabLanguage[0] = array( 'title' => $defaultLang);
}
else {
$tabLanguage[0] = array( 'title' => 'Default');
}
for ($i=0; $i<$numResult; $i++) {
$row =
$GLOBALS['TYPO3_DB']->sql_fetch_assoc($query);
$tabLanguage[$row['uid']] = $row;
}
}
return $tabLanguage;
}
$tabLanguages = get_website_languages('Français');
$strLangMenu = '';
$localTempl = new t3lib_TStemplate;
if (count($tabLanguages) > 0)
{
foreach ($tabLanguages as $idLang => $tabLangCaract)
{
$codelang = strtolower(substr($tabLangCaract['title'], 0,
2));
if($_REQUEST['L'] == $idLang) {
$codelang .= '-act';
}
$LD = $localTempl->linkData($GLOBALS['TSFE']->page,
'',
'',
'',
'',
'&L='.$idLang,
'0');
$link = $LD['totalURL'];
$strLangMenu .= '<span id="'.$codelang.'"><a
href="'.$link.'" title="'.$tabLangCaract['title'].'"></a></span>';
}
}
$content = $strLangMenu;
?>
Kann someone help me as i'm a really newbie to php and typo3? I think
that $GLOBAS['TSFE']->page gives me only the page id but the action...
Thanks a lot for your help,
Edi
COMMISSION DE SURVEILLANCE DU SECTEUR FINANCIER (CSSF) - Luxembourg
_________________________________________________________________________
This e-mail and any attachments transmitted with it are solely intended for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please delete it from your system and kindly inform the CSSF accordingly.
The CSSF excludes any warranty and any liability as to the contents of this e-mail and its attachments which shall not be binding upon the CSSF.
Commission de Surveillance du Secteur Financier, L-2991 Luxembourg
Phone : (+352) 26 25 1 -1 Fax: (+352) 26 25 16 01
E-mail: direction at cssf.lu Web site : www.cssf.lu
More information about the TYPO3-english
mailing list