[TYPO3-ttnews] News URLs not translated with cookie

Björn Pedersen pedersen at frm2.tum.de
Wed Jul 20 08:42:53 CEST 2011


Am 19.07.2011 19:49, schrieb adam harvie:
> Hi all,
> 
> We have a bilingual site with a tt_news LIST element on the front page. We
> use cb_cookie to check a language cookie and set the language in the
> template typoscript accordingly. The problem currently is that the front
> page content all renders in the correct language, but the URLs for the news
> list always render as the default language.
> 
> So:
> sys_language_uid:
> 0 = English
> 4 = French
> 
> TS setup in template as follows:
> 
> config {
>   linkVars = L
>   sys_language_uid = 0
>   language = en
>   locale_all = ca_EN
> }
> 
> [globalVar = GP:L=4] || [globalString = _COOKIE|lang = fr]
> config {
>   sys_language_uid = 4
>   language = fr
>   locale_all = ca_FR
> }
> [global]
> 
> *** END TS***
> 
> If the cookie 'lang' is set to 'fr', all the page content renders in French,
> the LIST titles and subheaders render in French, but the URLs are the
> default/English:
> ourdomain.tld/news-media/date/title
> 
> When we want:
> ourdomain.tld/fr/actualites-media/date/title
> 
> We also use CoolURI, if that's relevant. It seems to be tt_news isn't
> getting the right language information for generating its links.
> Is there anything I might be missing?
> 
> 
> Thanks,
> Adam Harvie
Hi,

Your problem is, that RealURL (that you are using, right?) only looks at
the linkVars in the standard setups, so it does not know about the
language cookie. For that you probably have to use a hook or a userfunc
in the configuration.

Björn

PS: I strongly recommend to use linkVars=L(0|4) for security reasons
(url spamming).



More information about the TYPO3-project-tt-news mailing list