Antwort
 
LinkBack Themen-Optionen Thema durchsuchen Thema bewerten Ansicht
  #1  
Alt 08.04.08, 09:49
Forum Newbie
 
Registriert seit: 08.03.08
Beiträge: 13
Mehrsprachiges Template

Hallo,
ich hab eine 2 Sprachige Homepage also Deutsch und Englisch in Typo3, dabei wird für beide Sprachen das selbe Template verwendet (in diesem Template sind viele Statische Punkte wie Flashbanner usw...) Ist es nun möglich für jede Sprache ein seperates Template anzulegen ?
Wenn ja, wie kann ich das machen ?

LG Noli ;-)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
Sponsored Links
  #2  
Alt 08.04.08, 09:53
Forum Freak
 
Registriert seit: 26.01.07
Beiträge: 521

Ja, das wäre möglich. Du könntest über die Conditions die Sprach abfragen und das passende Template + CSS einbinden.
__________________
mfg
Günni
City-Tiger - Online durch die Straßen tigern
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #3  
Alt 08.04.08, 09:56
Forum Newbie
 
Registriert seit: 08.03.08
Beiträge: 13

Super,
hab mit Typo3 schon ein paar nette aber doch eher einfache Sachen gemacht, leider hab ich keine Ahnung wie ich das nun umsetzten könnte, gibts dazu ein Tutorial oder kannst du mir ein script schicken wie ich das machen kann ?

vielen Dank Noli ;-)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #4  
Alt 08.04.08, 10:01
Forum Freak
 
Registriert seit: 26.01.07
Beiträge: 521

Du machst im Root TypoScript am besten die Condition rein:
[globalVar = GP:L=0]
# Anweisungen zum Template und CSS inkludieren
[global]
Hierbei steht die Variable L=0 für Englisch...
__________________
mfg
Günni
City-Tiger - Online durch die Straßen tigern
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #5  
Alt 08.04.08, 10:06
Forum Newbie
 
Registriert seit: 08.03.08
Beiträge: 13

Hallo,
danke für die super schnelle Antwort, der einfachkeit halber poste ich hier gleich mal das komplette Setup, die Sprache befindet sich ganz am Schluss.

thx Noli ;-)

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:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
Configuring the Auto-Parser for main template: - ERROR: Line 0: Object Name String, "Configuring" was not preceeded by any operator, =<>({
plugin.tx_automaketemplate_pi1 {
    # Read the template file:
content = FILE
content.file = fileadmin/templates/main/filia_home/index2.html
    # 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/templates/main/filia_home/
}

# Such Maschine
tt_content.search.20.noResultObj.10.value = Leider nichts gefunden.
tt_content.search.20.next.value = Nächstes
tt_content.search.20.prev.value = Zurück
tt_content.search.20.next.value = Weiter
tt_content.search.20.target = _self
tt_content.search.30.target = _self
tt_content.search.30.dataArray.10.label = Suche nach:
tt_content.search.30.dataArray.20.label = Suche in:
tt_content.search.30.dataArray.20.valueArray.10.label = Überschriften und Schlüsselwörtern
tt_content.search.30.dataArray.20.valueArray.20.label = Seiteninhalt
tt_content.search.30.dataArray.40.value = Suche starten
tt_content.search.20.renderObj.10.typolink.target = _self
tt_content.mailform.20.target = _self

# 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 =<td><img src="/fileadmin/templates/main/filia_home/blume.gif" width="15" height="15" />&nbsp;|&nbsp;</td>
NO.ATagParams = class="menu"
ACT.ATagParams = class="menu"
    # Enable active state and set properties:
ACT = 1
ACT.allWrap =<td><img src="/fileadmin/templates/main/filia_home/blume.gif" width="15" height="15" />&nbsp;|&nbsp;</td>
}
  # Second level menu-object, textual
temp.menu_1.2 = TMENU
temp.menu_1.2 {
    # Normal state properties
NO.allWrap = | &nbsp;
    # Enable active state and set properties:
ACT = 1
}

# Mail Form
tt_content.mailform.20.recipient >
tt_content.mailform.20.recipient = [email]office@cupspoiler.com[/email]

# 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
# Substitute the ###content### subpart with some example content:
subparts.news < styles.content.getLeft
# Substitute the ###content### subpart with some example content:
subparts.intro < styles.content.getRight
}


# 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
}

INHALT_RAND = CONTENT
INHALT_RAND {
table = tt_content
select {
where = colPos = 1
orderBy = sorting
languageField = sys_language_uid
}
}

# Default PAGE object:
page = PAGE
page.typeNum = 0
# Copying the content from TEMPLATE for <body>-section:
page.10 < temp.mainTemplate
# Copying the content from TEMPLATE for <head>-section:
page.headerData.10  < temp.headTemplate

# SprachVariable L initialisieren
config.linkVars = L

# Standardsprache UID 2 -> Englisch
[globalVar = GP:L = 2]
config.sys_language_uid = 2
config.language = en
config.locale_all = english

# Deutsch, sys_language.uid = 1
[globalVar = GP:L = 1]
config.sys_language_uid = 1
config.language = de
config.locale_all = de_DE
[global]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #6  
Alt 08.04.08, 10:45
Forum Newbie
 
Registriert seit: 08.03.08
Beiträge: 13

hmm ich glaube, ziemlich genau so hab ich das im meinem Setup, jedoch wo kann ich nun definieren, dass nun bei Englisch nicht auf Template "index2.html zugegriffen wird sondern auf english.html ?


THX Noli ;-)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #7  
Alt 08.04.08, 14:09
Forum Freak
 
Registriert seit: 26.01.07
Beiträge: 521

Du musst dort wo du dein Template einbindest die Abfrage machen welches Template er nutzen soll.
Typoscript-Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
plugin.tx_automaketemplate_pi1 {
    # Read the template file:
content = FILE
[globalVar = GP:L = 2] - ERROR: Line 3: Object Name String, "[globalVar" contains invalid character "[". Must be alphanumeric or one of: "_-."
content.file = fileadmin/templates/main/filia_home/template1.html
[global] - ERROR: Line 5: On return to [GLOBAL] scope, the script was short of 1 end brace(s)

[globalVar = GP:L = 1]
content.file = fileadmin/templates/main/filia_home/template2.html
[global]

    # 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
}
Codebeispiel ist ungetestet!
__________________
mfg
Günni
City-Tiger - Online durch die Straßen tigern
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
Antwort


Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge anzufügen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

vB Code ist An.
Smileys sind An.
[IMG] Code ist An.
HTML-Code ist Aus.
Trackbacks are An
Pingbacks are An
Refbacks are An


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Mehrsprachiges Menu alkativo TYPO3 4.x Fragen und Probleme 0 09.07.08 17:00
Seite basierend auf anderem Template in Template einbinden? Danwe TYPO3 4.x Fragen und Probleme 2 19.03.08 10:12
Mehrsprachiges Menü: Einzelne Sprache (z.B. default) für bestimmte Seiten gezielt ausblenden BoRado GMENU, HMENU, TMENU und Co. 3 06.01.08 19:30
Template Desaster - Vorlage sieht anders aus als Template Damned TemplaVoila 2 16.01.07 12:45
Neues Template angelegt: No template found! Lissy TYPO3 4.x Fragen und Probleme 0 17.10.06 08:37


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:24 Uhr.


Powered by vBulletin® Version 3.6.8 Patch Level 2 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Template-Modifikationen durch TMS