Hallo,
ich habe eine Mehrsprachige Seite (Deutsch English) erstellt, welche bereits einwandfrei funktioniert, nun ist es jedoch so, dass ich beim wechseln der Sprache gerne auch das Template (deutsch.html) mitaustauschen will zu (englisch.html) da im Template viele statische Elemente eingebaut sind, (Flash Banner etc) die später ebenfalls in Englisch sein sollen. Wie kann ich das jedoch umsetzten ? Der Einfachkeit halber poste ich hier das komplette Setup, die Sprache ist ganz unten definiert...
Hab zwar einige einfache Typo Seiten gemacht, jedoch ist mir das etwas zu schwierig.
Vieleicht kann mir ja jemand helfen.
LG Noli ;-)
# Configuring the Auto-Parser for main template:
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" /> | </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" /> | </td>
}
# Second level menu-object, textual
temp.menu_1.2 = TMENU
temp.menu_1.2 {
# Normal state properties
NO.allWrap = |
# Enable active state and set properties:
ACT = 1
}
# Mail Form
tt_content.mailform.20.recipient >
tt_content.mailform.20.recipient = office@cupspoiler.com
# 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]