[TYPO3-english] RealUrl and TypoLink
Jigal van Hemert
jigal.van.hemert at typo3.org
Fri Jul 22 11:31:37 CEST 2016
Hi,
On 21/07/2016 23:44, Sinisa Mitrovic wrote:
> This example is from documentation. My setup is like this:
> 'valueMap' => array(
> 'en-EN' => '0',
> 'en-DE' => '0',
> 'de-DE' => '1',
> ),
>
> So on German (German page have both German and English) page I have 'en-DE' as preVar, but on English page (only English) I also have 'en-DE', and I want to have 'en-EN'.
This is a mapping connected to the URL variable "L". This is in the URL
(when RealUrl is disabled) a numerical value. The mapping needs to work
in both directions.
In your setup you have two preVar values 'en-EN' and 'en-DE' connected
with a single value for "L".
TYPO3 generates a URL /index.php?id=24&L=0 , how is RealUrl supposed to
know if it should use 'en-EN' or 'en-DE'? Without looking in the code I
guess it will switch the keys and value in the valueMap array and ends
up connecting L=0 to 'en-DE'.
You need to assign the 'en-DE' pages to a different language then the
'en-EN' pages. These languages can be added as language records in the
root of the installation. Then you can use the uid of that language as
"L" parameter.
More information about how languages and translations are handled:
https://docs.typo3.org/typo3cms/FrontendLocalizationGuide/BasicSetupOfALocalizedWebsite/SettingUpLanguages/Index.html
--
Jigal van Hemert
TYPO3 CMS Active Contributor
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the TYPO3-english
mailing list