[TYPO3-ttnews] News URLs not translated with cookie

adam harvie adam.harvie at gmail.com
Wed Jul 20 14:25:05 CEST 2011


Thanks Björn. I suspected something like that may be the case.

We do in face use the linkVars for the rest of the site. We wanted to avoid
having multiple 'home' URLs however, so use the cookie just on the front
page.

I have a custom tt_news extension to produce some extra markers, which I
adapted to fix this situation. I was hoping there would be a configuration
solution, but this will do.

Thanks for the feedback.

-Adam

2011/7/20 Björn Pedersen <pedersen at frm2.tum.de>

> 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).
>
> _______________________________________________
> TYPO3-project-tt-news mailing list
> TYPO3-project-tt-news at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-tt-news
>



-- 
Adam Harvie

www.emergentbehaviour.org
e: adam.harvie at gmail.com
t: +27 79 963 7615


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