[TYPO3-english] tslib_pibase.pi_getPageLink, but for a specified language

David Vandemaele vd2m at hotmail.com
Mon Jan 19 10:39:06 CET 2009


Mathias Schreiber [wmdb >] schreef:
> David Vandemaele schrieb:
>> Is it possible to create a link for a certain language and id?
>> So, I want the url for page with ID 22, and for language with ID 3?
> 
> I guess you will use a certain GET Var so identify the language you're 
> using (comonly L).
> 
> Use $this->cObj->typolink('TEXT',$params);
> Params would be an array like this in your case:
> $params = array(
>     'parameter' => 22, (your page ID)
>     'additionalParams' => '&L=3', (the language, you're linking to)
> );
> 
> See TSRef for additional parameters you can supply.
> 
> enjoy
> Mathias

I know this functions, but I did not get what I expected. (Maybe that's 
the problem ;))

This is what I have:

$params = array('parameter' => 22, 'additionalParams' => '&L=3');
$content .= $this->cObj->getTypoLink("TEXT", $id, $params);

And this is what I get:

http://example.org/pagex/subpagey/?parameter=22&nocache=1&additionalParams=%26L%3D3

However, it should be 
http://example.org/language/pagex-translated/subpagey-translated

If I could get the translated url, prefixing the url with the language 
should not be a problem.

Any ideas how to achieve this?

Best regards,
David V.


More information about the TYPO3-english mailing list