Hidiho,
i got a TYPO3-Site with many translations for each langauge.
The Realurl-config for the translations are working fine, if a have a certain domain. For example domainname.com, domainname.de, domainname.es and so on.
Now i want to add a new translation (Portuguese), but i don't have a domain for it. I want to use the url domainname.com/pt for the new translation.
Does RealUrl supports this different way of use?
Previews in Backend are not working fine. The langauge-Menu contains an the correct Link, but when opening it, i get the standard-langauge (en).
In TS:
configname {
baseURL = https://www.domainname.com
sys_language_uid = 0
language = en
locale_all = en_EN
htmlTag_langKey = en
}
[globalVar = GP:L = 0]
configname {
sys_language_uid = 0
language = en
locale_all = en_EN
htmlTag_langKey = en
}
[global]
[globalVar = GP:L = 1]
configname {
sys_language_uid = 1
language = de
locale_all = de_DE
htmlTag_langKey = de
baseURL = https://www.domainname.de
}
[global]
....
#new config for portuguese
[globalVar = GP:L = 3]
configname {
sys_language_uid = 3
language = pt
locale_all = pt_PT
htmlTag_langKey = pt
}
[global]
perhaps i don't know to config realurl_conf.php correctly for this purpose.
Here it comes:
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
'preVars' => array(
array(
'GETvar' => 'L',
'valueMap' => array(
'pt' => '3',
),
'valueDefault' => '',
'noMatch' => 'bypass',
),
),
....
);
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DOMAINS'] = array(
'encode' => array(
array(
'GETvar' => 'L',
'value' => '',
'ifDifferentToCurrent' => true,
'useConfiguration' => '_DEFAULT',
'urlPrepend' => 'https://www.domainname.com',
),
array(
'GETvar' => 'L',
'value' => '0',
'ifDifferentToCurrent' => true,
'useConfiguration' => '_DEFAULT',
'urlPrepend' => 'https://www.domainname.com'
),
array(
'GETvar' => 'L',
'value' => '1',
'ifDifferentToCurrent' => true,
'useConfiguration' => '_DEFAULT',
'urlPrepend' => 'https://www.domainname.de'
),
array(
'GETvar' => 'L',
'value' => '2',
'ifDifferentToCurrent' => true,
'useConfiguration' => '_DEFAULT',
'urlPrepend' => 'https://www.domainname.es'
),
array(
'GETvar' => 'L',
'value' => '4',
'ifDifferentToCurrent' => true,
'useConfiguration' => '_DEFAULT',
'urlPrepend' => 'https://www.domainname.cn'
),
array(
'GETvar' => 'L',
'value' => '6',
'ifDifferentToCurrent' => true,
'useConfiguration' => '_DEFAULT',
'urlPrepend' => 'https://www.domainname.com'
),
),
'decode' => array(
'www.domainname.com' => array(
'GETvars' => array(
'L' => '0',
),
'useConfiguration' => '_DEFAULT',
),
'www.domainname.de' => array(
'GETvars' => array(
'L' => '1',
),
'useConfiguration' => '_DEFAULT'
),
'www.domainname.es' => array(
'GETvars' => array(
'L' => '2',
),
'useConfiguration' => '_DEFAULT'
),
'www.domainname.cn' => array(
'GETvars' => array(
'L' => '4',
),
'useConfiguration' => '_DEFAULT'
),
),
);
Any suggestions how to say realurl that its the langauge 3 it has to use?
Thank you guys for your answers.
I found a solution. It's all abput the encode/decode blocks and preVars. In Addtion i hooked me into UrlDecoder (function setRequestVariables(){...}) ecspacially for my purpose (dirty fix). One Configuration is enough to get real_url work for mixing up multi-domain and language-parameters.
realurl_conf.php
Now the Endcode/Decode Block:
RealurlUrlDecoder.php