|
|||||||
| Registrieren | Hilfe | Benutzerliste | Kalender | Suchen | Heutige Beiträge | Alle Foren als gelesen markieren |
|
#1
|
|||
|
|||
|
Hallo Zusammen,
Weist jemand wie man von innerhalb typoscript ermittelt ob eine übersetzung für eine bestimmte Seite existiert fuer eine bestimmte sprache. z.b. ich will in typoscript ermitteln " existiert die seite wo ich jetzt bin auf sprache L=2 " Falls Ja : xxxx Falls Nein: yyyyy vielen dank im voraus. _______________________________________________ TYPO3-german mailing list TYPO3-german (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/...o/typo3-german |
|
#2
|
|||
|
|||
|
Hi Ralph!
Zum Anzeigen von Sprachwechsel Buttons nutze schlicht eine eigene PHP Datei mit beispielsweise folgendem Inhalt ### require_once(PATH_tslib.'class.tslib_content.php') ; $lcObj = new tslib_cObj(); // 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 = '> '; // 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[] = '<a href="index.php?id='.$GLOBALS["TSFE"]->id.'&L=0">'.($GLOBALS["TSFE"]->sys_language_uid==0?$pointer:"").'deutsch</a>'; $flags[] = ($langArr[1]?'<a href="index.php?id='.$GLOBALS["TSFE"]->id.'&L=1">'.($GLOBALS["TSFE"]->sys_language_uid==1?$pointer:"").'english</a>':"english"); */ $flags = array(); $flags[] = '<a href="http://DOMAIN/'.$lcObj->getTypoLink_URL($GLOBALS["TSFE"]->id,$_GET)..'">'.($GLOBALS["TSFE"]->sys_language_uid==0?$pointer:"").'deutsch</a>'; $flags[] = ($langArr[1]?'<a href="http://DOMAIN/'.$lcObj->getTypoLink_URL($GLOBALS["TSFE"]->id,$_GET)..'">'.($GLOBALS["TSFE"]->sys_language_uid==1?$pointer:"").'english</a>':"english"); // 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 = '<ul class="menu_level1"><li>' . $flags[0] . '</li>'.($langArr[1]?'<li>' . $flags[1] . '</li>':'').'</ul>'; ### Viele Grüße, Stefan Ralph Grier wrote: > Hallo Zusammen, > > Weist jemand wie man von innerhalb typoscript ermittelt ob eine übersetzung > für eine bestimmte Seite existiert fuer eine bestimmte sprache. > > z.b. ich will in typoscript ermitteln " existiert die seite wo ich jetzt bin > auf sprache L=2 " > Falls Ja : > xxxx > Falls Nein: > yyyyy > > vielen dank im voraus. _______________________________________________ TYPO3-german mailing list TYPO3-german (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/...o/typo3-german |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | Thema bewerten |
|
|
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [TYPO3-german] Änderung der Übersetzung von indexed search | daniel@schau-mal-hin.de | typo3-german@lists.netfielders.de | 7 | 18.04.2007 23:31 |
| [TYPO3-german] Ver. 4.0.5 - Deutsche Übersetzung nicht vorhanden ?!? | Frank Birzle | typo3-german@lists.netfielders.de | 1 | 27.02.2007 19:01 |
| [TYPO3-german] sr_feuser_register Übersetzung auf Deutsch | Robert Markula | typo3-german@lists.netfielders.de | 2 | 30.01.2007 07:53 |
| Re: [TYPO3-german]sr_feuser_register Übersetzung auf Deutsch | Elno | typo3-german@lists.netfielders.de | 0 | 29.01.2007 20:42 |
| [TYPO3-german] automatisierte Workflows für Übersetzung | Christoph Kuhn | typo3-german@lists.netfielders.de | 0 | 29.12.2006 16:30 |