[TYPO3] Force Language and L-parameter

JoH asenau info at cybercraft.de
Wed Nov 29 12:27:34 CET 2006


> A possible - but dirty - solution:
>
> For now we have a solution which is not really nice, but at least it
> works. Idea is to include a library with TypoScript on the page where
> we want to force the language. This can easily be done like this:
>
> #include library to insure that the L parameter is set
> includeLibs.tx_lparam = fileadmin/templates/libraries/set_l_param.inc
>
> The library does two simple things.
> 1. checks if L is set
> 2. if L is not set, the page is reloaded with L set to our preferred
> value (L=1)

If you are able to set the language using a condition (or maybe a TS
ext-template), you could change the default behaviour for typolink (which is
used for almost any link in TYPO3) too.

Simply add

additionalParams = &L=123

to any occurence of typolink.
OK - I have to admit that it's not that simple, since there might be many
different places and for menus it's a bit tricky, but it should work without
a reload then.

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC/Xing: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com




More information about the TYPO3-english mailing list