Hallo zusammen ...
ich brauch mal wieder Hilfe #angry#
Ich habe kürzlich zwei Seiten mit Typo3 4.0 aufgesetzt. Server und MySQL sind gleich und auch das Typoscript stimmt fast überein. Komischwerweise habe ich allerdings den Effekt, dass der Sprachwechsel über das bekannte my_languageMenu.php zwar angezeigt wird nicht angezeigt wird.
Der Typoscript code sieht so aus:
# Einbinden der Vorlage:
seite = PAGE
seite.typeNum = 0
seite.bodyTag = <body bgcolor="#FFFFFF" background="fileadmin/pageimages/background.png">
seite.meta.KEYWORDS.field = keywords
seite.config.index_enable = 1
# CSS:
seite.stylesheet = fileadmin/css/stylesheet.css
# Template:
seite.10 = TEMPLATE
seite.10 {
template = FILE
template.file = fileadmin/template.html
workOnSubpart = DOKUMENT
marks.INHALT < styles.content.get
marks.RAND < styles.content.get
# Inhaltsausgabe:
marks.INHALT = CONTENT
marks.INHALT {
table = tt_content
select.orderBy = sorting
select.where = colPos=0
select.languageField = sys_language_uid
}
# Randausgabe:
marks.RAND = CONTENT
marks.RAND {
select.orderBy = sorting
select.where = colPos=3
select.languageField = sys_language_uid
}
# Sprache:
# Stimmungsbilder:
marks.HEADERIMGLEFT = IMAGE
marks.HEADERIMGLEFT {
file = fileadmin/pageimages/automotiv-links.jpg
}
marks.HEADERIMGMIDDLE = IMAGE
marks.HEADERIMGMIDDLE {
file = fileadmin/pageimages/automotiv-mitte.jpg
params = class="pictureborder"
}
marks.HEADERIMGRIGHT = IMAGE
marks.HEADERIMGRIGHT {
file = fileadmin/pageimages/automotiv-rechts.jpg
}
# Menues:
marks.MENU= HMENU
marks.MENU.entryLevel = 0
marks.MENU.1 = TMENU
marks.MENU.1 {
NO {
allWrap = <tr valign="top"><td class="navi">|</td></tr>
ATagParams=class="navi"
}
ACT = 1
ACT {
allWrap = <tr valign="top"><td class="naviactive">|</td></tr>
ATagParams=class="navi_active"
}
}
marks.MENU.2 = TMENU
marks.MENU.2 {
NO {
allWrap = <tr valign="top"><td class="navi">|</td></tr>
ATagParams=class="navi"
beforeImg = fileadmin/pageimages/pfeilchentrans.gif
beforeROImg = fileadmin/pageimages/pfeilchen.gif
RO = 1
}
ACT = 1
ACT {
allWrap = <tr valign="top"><td class="naviactive">|</td></tr>
ATagParams=class="navi_active"
beforeImg = fileadmin/pageimages/pfeilchen.gif
}
}
#Sprache
marks.SPRACHE= PHP_SCRIPT
marks.SPRACHE {
file = fileadmin/scripts/my_languageMenu.php
}
# Klickpfad:
marks.KLICKPFAD = HMENU
marks.KLICKPFAD {
special = rootline
special.range = 1 | -1
1 = TMENU
1 {
NO {
allWrap = | <span class="breadcrumb"> / </span>
ATagParams=class="breadcrumb"
}
}
}
}
# Spracheinstellung:
config.linkVars = L
config.sys_language_uid = 0
config.language = de
config.locale_all = deutsch
config.metaCharset = UTF-8
config.index_enable = 1
plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 0
[globalVar = GP:L = 1]
config.sys_language_uid = 1
config.language = en
config.locale_all = english
config.metaCharset = utf-8
config.index_enable = 1
plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 1
[global]
und das my_languageMenu.php Script
// First, select all pages_language_overlay records on the current page. Each represents a possibility for a language.
$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" alt="" />';
//$pointer = '<img src="fileadmin/img/pfeilchen.gif" align="middle" alt="" />';
// 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=_top><img src="fileadmin/images/de.gif" width="21" height="13" hspace="5" border="0" alt="" /></a>';
//$flags[] = ($GLOBALS["TSFE"]->sys_language_uid==1?$pointer:"").'<a href="index.php?id='.$GLOBALS[" tsfe-="">id.'&L=1" target=_top><img src="fileadmin/images/gb.gif" width="21" height="13" hspace="5" border="0" alt="" /></a>';
//$flags[] = ($GLOBALS["TSFE"]->sys_language_uid==2?$pointer:"").'<a href="index.php?id='.$GLOBALS[" tsfe-="">id.'&L=2" target=_top><img src="fileadmin/images/pl.gif" width="21" height="13" hspace="5" border="0" alt="" /></a>';
$flags[] = ($GLOBALS["TSFE"]->sys_language_uid==0?"":"").'<a class="navi" href="index.php?id='.$GLOBALS[" tsfe-="">id.'&L=0" target=_top>Deutsch</a>';
$flags[] = ($GLOBALS["TSFE"]->sys_language_uid==1?"":"").'<a class="navi" href="index.php?id='.$GLOBALS[" tsfe-="">id.'&L=1" target=_top>English</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 = '<table border="0" cellpadding="3" cellspacing="0" width="198"><tr><td>'.implode(" / ",$flags).'</td></</tr></table>';
//$content = '<tr><td class="ft10px333333">'.implode("/",$flags).'</td></</tr>';
?>
Wenn ich dann auf Englisch umschalte wird zwar L=1 angezeigt, aber im Menü wird die englische Übersetzung nicht eingeblendet. I
Irgendwer ne Idee?