?> Mike Beck Computerdienstleistungen Mike Beck Computerdienstleistungen: Notiz
Google Sitemap bei mehrsprachigen Seiten >
06.06.2009 21:19 Alter: 3 yrs
Von: Dipl.-Ing. (FH) Mike Beck

Mehrere Sprachen auf verschiedene Domains verteilen


das ist inzwischen direkt mit realurl möglich. Dazu muss nur _DOMAINS konfiguriert werde. z.B. so:

<code>'_DOMAINS' => array(
'encode' => array(
array(
'GETvar' => 'L',
'value' => '0',
'useConfiguration' => '_DEFAULT',
'urlPrepend' => 'englischeSeite.de'
),
array (
'GETvar' => 'L',
'value' => '1',
'useConfiguration' => '_DEFAULT',
'urlPrepend' => 'deutscheSeite.de'
)
),
'decode' => array(
'englischeSeite.de' => array (
'GETvars' => array (
'L' => '0',
'lang'=>'en'
),
'useConfiguration' => '_DEFAULT'
),
'deutscheSeite.de' => array (
'GETvars' => array (
'L' => '1',
'lang'=>'de'
),
'useConfiguration' => '_DEFAULT'
)
)
),</code>

Die PreVars sind deswegen trotzdem wie üblich zu konfigurieren:

<code>'preVars' => array (
'0' => array (
'GETvar' => 'no_cache',
'valueMap' => array (
'nc' => '1',
),
'noMatch' => 'bypass'
),
'1' => array (
'GETvar' => 'L',
'valueMap' => array (
'de' => '0',
'en' => '1',
),
'noMatch' => 'bypass',
),
'2' => array (
'GETvar' => 'lang',
'valueMap' => array (
'de' => 'de',
'en' => 'en',
),
'noMatch' => 'bypass',
),
),</code>

weiterhin ist folgende Konfig im Template notwendig:

<code>config.sys_language_overlay=hideNonTranslated 
config.sys_language_mode = strict

# Setting up the language variable "L" to be passed along with links
config.linkVars = L(0-1)

### defining the default language
config {
sys_language_uid = 0
language = de
locale_all = de_DE
htmlTag_langKey = de
baseURL = www.deutscheSeite.de
}
plugin.tx_staticinfotables_pi1{
languageCode = DE
countryZoneCode = DE
countryCode = GER
}
plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 0

### German language, sys_language.uid = 0

[globalString = IENV:HTTP_HOST = *deutscheSeite.de]

config {
sys_language_uid = 0
language = de
locale_all = de_DE
htmlTag_langKey = de
baseURL = www.deutscheSeite.de
}

plugin.tx_staticinfotables_pi1 {
languageCode = DE
countryZoneCode = DE
countryCode = GER
}

plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 0

[global]

### English language, sys_language.uid = 1

[globalString = IENV:HTTP_HOST = *englischeSeite.de]
config {
sys_language_uid = 1
language = en
locale_all = en_US
htmlTag_langKey = en
baseURL = www.englischeSeite.de
}
plugin.tx_staticinfotables_pi1 {
languageCode = EN
countryZoneCode = DE
countryCode = GER
}
plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 1

[global]

# utf8 umstellung
page.config.metaCharset = utf-8
page.config.additionalHeaders = Content-Type:text/html;charset=utf-8

# languagemenu

lib.langMenu = HMENU
lib.langMenu {
special = language
special.value = 0,1
normalWhenNoLanguage = 0
}
lib.langMenu.1 = TMENU
lib.langMenu.1 {
NO = 1
NO {
stdWrap.override = DEUTSCH  || ENGLISH
}
ACT < lib.langMenu.1.NO
ACT = 0
ACT {
noLink = 1
}
}
[globalVar = GP:L = 0]
lib.langMenu.special.value=1
lib.langMenu.1.NO.stdWrap.override = ENGLISH ||

[global]
[globalVar = GP:L = 1]
lib.langMenu.special.value=0
lib.langMenu.1.NO.stdWrap.override = DEUTSCH ||
[global]
</code>

Derzeit hat realurl leider noch einen Bug, der dafür sorgt, dass die Pfadnamen nicht richtig übersetzt werden (auch wenn adaltas_realurl_i18n installiert ist). Den habe ich aber gefunden und er lässt sich eigentlich ganz einfach beheben: näheres in der Bug-DB von typo3. Bin gespannt, ob es das in die nächste Veröffentlichung schafft.