Search code examples
typo3typo3-7.6.xrealurl

changing TYPO3 realurl language urls


I'm using TYPO3 7.6.11 and realurl 2.0.15

my translated versions got this url:

http://url.de/3/services

is there a way to replace the 3 with the language code? for 3 it should be en for example?

thanks a lot


Solution

  • You need to add the 'preVars' configuration array for your languages to realurl. It is straigtly described in the manual: Realurl manual - language example config deep-link

    Excerpt/Example:

        $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'] ['realurl'] ['_DEFAULT'] ['preVars'] => array(
                    array(
                        'GETvar' => 'L',
                        'valueMap' => array(
                            'de' => '0',
                            'en' => '1',
                            ),
                        'valueDefault' => 'de',
                        # 'noMatch' => 'bypass',
                    ),
    );
    

    Alternatively you could just use the 'automatic configuration' shipped with realurl. AFAIR it usually adds also lang-configs. The Auto-Conf feature is to be enabled via Extension-Manager.