Einzelnen Beitrag anzeigen
  #1  
Alt 25.12.07, 19:32
Chrisse Chrisse ist offline
Forum Newbie
 
Registriert seit: 22.07.06
Beiträge: 31

Mehrsprachigkeit - Nur Default language wird angezeigt


Guten Abend,

ich habe schon in einigen Foren gesucht, aber immer noch keine Antwort gefunden. Deshalb stelle ich meine Frage einfach hier.

Ich bin nach folgendem Tutorial verfahren: typo3 Mehrsprachig Tutorial | Mehrsprachen | Sprachen.

Es funktioniert auch alles soweit, nur wird leider nicht die Übersetzung angezeigt.

Typoscript-Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
config.sys_language_overlay = hideNonTranslated
config.sys_language_softMergeIfNotBlank = tt_content:image, tt_content:header
config.linkVars = L
config.sys_language_uid = 0
config.language = de
config.locale_all = de_DE
# English language, sys_language.uid = 1
[globalVar = GP:L = 1]
config.sys_language_uid = 1
config.language = en
config.locale_all = english
[global]

page.10.marks.NAVIGATION = COA  
page.10.marks.NAVIGATION {

10 = HMENU

10 {

entryLevel = 0

excludeUidList = 25,26,27,28,29,30,31,32,47

1 = TMENU

1 {

expAll = 0

noBlur = 1

wrap = <ul>|</ul>

IProcFunc = user_IProc_dfn

NO = 1

NO.ATagTitle.field = abstract // description // subtitle

NO.allWrap = |<span class="hidden">.</span>

NO.wrapItemAndSub = <li>|</li>

NO.stdWrap.htmlSpecialChars = 1

CUR < .NO

CUR = 1

CUR.allWrap = <strong>|<span class="hidden">.</span></strong>

CUR.doNotLinkIt = 1

CUR.stdWrap.htmlSpecialChars = 1

}

2 < .1

3 < .1

4 < .1

}

25 = PHP_SCRIPT

25.file = fileadmin/scripts/example_languageMenu.php

30 < styles.content.getLeft

}

languageMenu.php:

PHP-Code:
 * @author    Kasper Skaarhoj <kasperYYYY@typo3.com>
 */


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 src="'.t3lib_extMgm::siteRelPath('cms').'typo3/gfx/content_client.gif" width="7" height="10" 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="'.htmlspecialchars('index.php?id='.$GLOBALS['TSFE']->id.'&L=0').'" target="_top"><img src="fileadmin/templates/images/icons/de.gif" width="21" height="13" hspace="5" border="0" alt="" /></a>';
$flags[] = ($GLOBALS['TSFE']->sys_language_uid==1?$pointer:'').'<a href="'.htmlspecialchars('index.php?id='.$GLOBALS['TSFE']->id.'&L=1').'" target="_top"><img src="fileadmin/templates/images/icons/gb'.($langArr[1]?'':'_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 '<table border="0" cellpadding="0" cellspacing="0"><tr><td><img src="clear.gif" width="30" height="1" alt="" /></td><td>'.implode('',$flags).'</td></tr></table>';

?> 
An was könnte es denn liegen, dass die Sprache nicht gewechselt wird? Wer will kann es auf Startseite oben links ausprobieren.

Viele Grüße

Chrisse

Geändert von Chrisse (27.12.07 um 22:21 Uhr).
Mit Zitat antworten