[TYPO3-english] Re: [TYPO3] cooluri & language detection

Žiga Dolhar ziga at dolhar.si
Thu Mar 31 10:34:56 CEST 2011


Hello list,

I seem to be having a similar problem. My primary site language is 
Slovene (si) and English as alternative.

With rlmp_language_detection turned off, everything works without a 
glitch. My CoolURI configuration is as follows:

   <valuemaps>
     <valuemap>
       <parameter>L</parameter>
       <!-- L is empty of 0, result is empty -->
       <value key="">0</value>
       <!-- L is 1, result is "en" -->
       <value key="si">1</value>
       <value key="en">2</value>
       <value key="de">3</value>
     </valuemap>
   </valuemaps>

My default template is as follows:

config.language = si
config.locale_all = si_SI
config.htmlTag_langKey = si-SI
config.sys_language_uid = 1

[globalVar = GP:L = 2]
config.language = en
config.locale_all = en_EN
config.htmlTag_langKey = en-EN
config.sys_language_uid = 2

My rlmp plugin configuration is:

   plugin.tx_rlmplanguagedetection_pi1 {
     useOneTreeMethod = 1
     defaultLang = si
   }

With the language detection turned on, detection in general works; 
english users are correctly redirected to /en/ (with properly generated 
links). However, Slovenian users are also directed to /si/ - which they 
shouldn't be, as "si" is already the default language.

The website is: http://zigadolhar.com/

This is especially funny as rlmp extension redirects users to "/si/" 
subpages, while the language menu (correctly, I'd think) redirects 
Slovenian users to "/" (root). Also, while CoolURI generates otherwise 
correct links to tt_news-items, it doesn't do so under "/si/" branch. 
For example, generated URL is:

http://zigadolhar.com/si/zapisi/prispevek/125/

However, if the user clicks "Slovenščina" in the top right language menu 
he is redirected to the correct link,

http://zigadolhar.com/zapisi/prispevek/willem-c-visu-naproti/

I have read this thread but was unable to find the solution. I 
understand I have probably just missed something important and hope an 
experienced typo3 user would be able to quickly find the troublesome 
configuration error :-/.

Thanks,
Žiga

On 21.8.2008 20:15, Freddy Tripold wrote:
> Hi,
>
> I am trying to using cooluri with rlmp_language_detection. All works
> fine except the first call of the startpage in the default language. The
> language detection tries to forward to /index.php?id=xy&L=0 and the
> .htaccess will rewrite to site.html. So the call ends with an error.
> I think this is normal in cause of the configuration of the extensions.
> My solution was to put in the xml conf
> <valuemap>
> <parameter>L</parameter>
> <value key="de">0</value>
> <value key="en">1</value>
> </valuemap>
> now the Url in the default language is like this
> www.domain.tld/de/home.html, but it should be without the language
> parameters. As seen on cooluri tutorial, one of the cooluri example
> sites (www.sunisa-ranck.com).
> So is it possible to remove the default language part from Url or are
> there other ways to make a language detection wich works better?
>
> br
> Freddy



More information about the TYPO3-english mailing list