![]() |
| | LinkBack | Themen-Optionen | Thema bewerten | Ansicht |
|
#1
| |||
| |||
Hallo, bei meinen Pagecontents, die lediglich in der Default-Sprache angelegt sind UND bei denen die Default-Sprache nicht gleichzeitig als Alternative Sprache hinzugefügt wurde, wird im Front-End die Default-Sprache in der Fahne ausgeblendet. Die Fahne (Englisch / L=0 - Default language) müsste eingeblendet sein, da ja der content in der Default-Sprache zur Verfügung steht. Weiß jemand, wie die Defaultsprache gleichzeitig Alternative Sprache ist bzw. wie die Sprache L=0 als Fahne eingeblendet wird? Ist das ein Bug in Typo3? Meine Script sieht wie folgt aus: page.meta.verify-v1 = JqqUM5i1gj6UwL0jqJ79dlQGwWPj0MpV11nPJFG4IO0= # Remove L-Bug config.uniqueLinkVars = 1 # Localization config.sys_language_mode = content_fallback mod.SHARED.defaultLanguage.title = English mod.SHARED.defaultLanguage.flag = fileadmin/img/en.gif mod.SHARED { defaultLanguageLabel = Englisch defaultLanguageFlag = fileadmin/img/en.gif } config { extTarget = _blank linkVars = L sys_language_uid = 0 language = en locale_all = en_EN xhtml_cleaning=all } plugin.tx_indexedsearch._LOCAL_LANG = en [globalVar = GP:L = 0] config.linkVars = L config.sys_language_uid = 0 config.language = en config.locale_all = en_EN plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 0 # English language, sys_language.uid = 1 [globalVar = GP:L = 1] config.sys_language_uid = 1 config.language = de config.locale_all = german [globalVar = GP:L = 2] config.sys_language_uid = 2 config.language = es config.locale_all = spanish [globalVar = GP:L = 3] config.sys_language_uid = 3 config.language = fr config.locale_all = french [globalVar = GP:L = 4] config.sys_language_uid = 4 config.language = cn config.locale_all = chinese [global] # Defining the Subpart "sprache" temp.sprache = PHP_SCRIPT temp.sprache.file = fileadmin/template/main/sprache.php # Substitute the ###SPRACHE### subpart subparts.sprache < temp.sprache #Spam-Schutz config.spamProtectEmailAddresses = 2 config.spamProtectEmailAddresses_atSubst = (at) #---------------------------------------- # Configuring the Auto-Parser for main template: plugin.tx_automaketemplate_pi1 { # Read the template file: content = FILE content.file = fileadmin/template/main/template_1.html # content.file = fileadmin/template/main/test.htm # Here we define which elements in the HTML that # should be wrapped in subpart-comments: elements { BODY.all = 1 BODY.all.subpartMarker = DOCUMENT_BODY HEAD.all = 1 HEAD.all.subpartMarker = DOCUMENT_HEADER HEAD.rmTagSections = title TD.all = 1 } # Prefix all relative paths with this value: relPathPrefix = fileadmin/template/main/ } # Menu 1 cObject temp.menu_1 = HMENU # First level menu-object, textual temp.menu_1.1 = TMENU temp.menu_1.1 { # Normal state properties NO.allWrap = <div class="menu1-level1-no"> | </div> # Enable active state and set properties: ACT = 1 ACT.allWrap = <div class="menu1-level1-act"> | </div> } # Second level menu-object, textual temp.menu_1.2 = TMENU temp.menu_1.2 { # Normal state properties NO.allWrap = <div class="menu1-level2-no"> | </div> # Enable active state and set properties: ACT = 1 ACT.allWrap = <div class="menu1-level2-act"> | </div> } # Main TEMPLATE cObject for the BODY temp.mainTemplate = TEMPLATE # Main TEMPLATE cObject for the BODY temp.mainTemplate = TEMPLATE temp.mainTemplate { # Feeding the content from the Auto-parser to the TEMPLATE cObject: template =< plugin.tx_automaketemplate_pi1 # Select only the content between the <body>-tags workOnSubpart = DOCUMENT_BODY # Substitute the ###menu_1### subpart with dynamic menu: subparts.menu_1 < temp.menu_1 # Substitute the ###content### subpart with some example content: subparts.content < styles.content.get # subparts.content = TEXT # subparts.content.value = HELLO WORLD - CONTENT # subparts.langmenu = TEXT # subparts.langmenu.value = HELLO WORLD - CONTENT #page.10 = PHP_SCRIPT #page.10.file = fileadmin/template/main/sprache.php subparts.langmenu = PHP_SCRIPT subparts.langmenu.file = fileadmin/template/main/sprache.php } # Main TEMPLATE cObject for the HEAD temp.headTemplate = TEMPLATE temp.headTemplate { # Feeding the content from the Auto-parser to the TEMPLATE cObject: template =< plugin.tx_automaketemplate_pi1 # Select only the content between the <head>-tags workOnSubpart = DOCUMENT_HEADER } # Default PAGE object: page = PAGE page.typeNum = 0 # Copying the content from TEMPLATE for <body>-section: page.10 = PHP_SCRIPT page.10.file = fileadmin/template/main/sprache.php page.10 < temp.mainTemplate # Copying the content from TEMPLATE for <head>-section: page.headerData.10 < temp.headTemplate config.language = en styles.content.lastUpdate.strftime = %e. %B %Y page.10.65 < styles.content.lastUpdate Mein Sprachenwähler: <?php /*************************************************************** * Copyright notice * * (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com) * All rights reserved * * This script is part of the TYPO3 project. The TYPO3 project is * free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * The GNU General Public License can be found at * GNU General Public License - GNU Project - Free Software Foundation (FSF). * A copy is found in the textfile GPL.txt and important notices to the license * from the author is found in LICENSE.txt distributed with these scripts. * * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ /** * Creates a language-selector menu with three flags, a german, an english and a french flag for each language supported on the site. * * THIS IS AN EXAMPLE designed to work with the official TYPO3 testsite, section "Another site in the ..." * You will have to program a similar menu for your own case. * * $Id: example_languageMenu.php,v 1.6 2005/04/01 14:37:14 typo3 Exp $ * Revised for TYPO3 3.6 June/2003 by Kasper Skaarhoj * XHTML compliant * * @author Kasper Skaarhoj <kasperYYYY@typo3.com> * * modified for the template YAML for Typo3: Dieter Bunkerd db@t3net.de */ if (!is_object($this)) die ('Error: No parent object present.'); // First, select all pages_language_overlay records on the current page. Each represents a possibility for a language. $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages_language_overlay', 'pid='.intval($GLOBALS['TSFE']->id).$GLOBALS['TSFE']->sys_page->enableFields('pages_language_overlay'), 'sys_language_uid'); $langArr = array(); while($row = $GLOBALS['TYPO3_DB']->sql_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 class="arrow" src="fileadmin/img/arrow.gif" width="7" height="10" 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 and not linked. $flags = array(); $flags[] = '<a href="'.htmlspecialchars('index.php?id='.$GLOBALS['TSFE']->id.'&L=0').'" target="_top"><img src="fileadmin/img/flag_en'.($langArr[0]?'':'_d').'.gif" width="21" height="13" hspace="5" border="0" alt="" /></a>'; $flags[] = '<a href="'.htmlspecialchars('index.php?id='.$GLOBALS['TSFE']->id.'&L=1').'" target="_top"><img src="fileadmin/img/flag_de'.($langArr[1]?'':'_d').'.gif" width="21" height="13" hspace="5" border="0" alt="" /></a>'; $flags[] = '<a href="'.htmlspecialchars('index.php?id='.$GLOBALS['TSFE']->id.'&L=2').'" target="_top"><img src="fileadmin/img/flag_es'.($langArr[2]?'':'_d').'.gif" width="21" height="13" hspace="5" border="0" alt="" /></a>'; $flags[] = '<a href="'.htmlspecialchars('index.php?id='.$GLOBALS['TSFE']->id.'&L=3').'" target="_top"><img src="fileadmin/img/flag_fr'.($langArr[3]?'':'_d').'.gif" width="21" height="13" hspace="5" border="0" alt="" /></a>'; $flags[] = '<a href="'.htmlspecialchars('index.php?id='.$GLOBALS['TSFE']->id.'&L=4').'" target="_top"><img src="fileadmin/img/flag_cn'.($langArr[4]?'':'_d').'.gif" width="21" height="13" hspace="5" border="0" alt="" /></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 = '<div class="langMenu">'.implode($flags).'</div>'; ?> Gruß, Gerik |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | Thema bewerten |
| |
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Gelöst Mehrsprachigkeit - Nur Default language wird angezeigt | Chrisse | TYPO3 4.x Fragen und Probleme | 2 | 27.12.07 10:23 |
| Mehrsprachigkeit - Default Sprache wird im Menü angezeigt | JaCk | TYPO3 4.x Fragen und Probleme | 1 | 03.09.07 13:15 |
| Mehrsprachige Seite - Nur default wird angezeigt | Aldarin | TYPO3 4.x Fragen und Probleme | 5 | 21.08.07 18:44 |
| Default language und Fahnen | gerik | TYPO3 4.x Fragen und Probleme | 2 | 05.06.07 15:22 |
| Templavoila + Multilang = nur default Sprache wird angezeigt | Winddancer | TYPO3 4.x Fragen und Probleme | 5 | 21.05.07 13:20 |