Hallo,
ich habe mit der languageMenu.php einen Sprachwechsler realisiert, der auch so einwandfrei funktioniert. Es werden momentan alle Sprachen durch Flaggen angezeigt. Ich möchte jedoch gerne, dass die Flagge der zur Zeit angezeigten Sprache ausgeblendet wird. Wie kann ich das in der PHP-Datei ändern?
$query = "SELECT * FROM pages_language_overlay WHERE pid=".$GLOBALS["TSFE"]->id.$GLOBALS["TSFE"]->sys_page->enableFields("pages_language_overlay")." GROUP BY sys_language_uid";
$res = mysql(TYPO3_db,$query);
$langArr=array();
while($row=mysql_fetch_assoc($res)) {
$langArr[$row["sys_language_uid"]]=$row["title"];
}
// Little red arrow, which is inserted to the left of the flag-icon if the TSFE->sys_language_uid equals the language uid (notice that 0=english, 1=danish and 2=german is SPECIFIC to this database, because these numbers refer to uid's of the table sys_language)
//$pointer = '<img src="t3lib/gfx/content_client.gif" width="7" height="10" align=middle>';
// Set each icon. If the language is the current, red arrow is printed to the left. If the language is NOT found (represented by a pages_language_overlay record on this page), the icon is dimmed.
$flags = array();
$flags[] = ($GLOBALS["TSFE"]->sys_language_uid==0?$pointer:"").'<a href="index.php?id='.$GLOBALS["TSFE"]->id.'&L=0" target=_parent><img src="fileadmin/relaunch/images/layout/germany.gif" width="24" height="12" hspace=5 border="0"></a>';
$flags[] = ($GLOBALS["TSFE"]->sys_language_uid==7?$pointer:"").'<a href="index.php?id='.$GLOBALS["TSFE"]->id.'&L=1" target=_parent><img src="fileadmin/relaunch/images/layout/uk.gif" width="24" height="12" hspace=5 border="0"></a>';
// Make the little menu. Notice, the menu does ONLY transfer the page-id and the "L" variable (which is also SPECIFIC for this website because "L" has been used in the extension template used to control the language setup)
$content = implode("",$flags);