Apply default language here:
<?php
namespace Vendor\Ext\Decoder;
class UrlDecoder extends \DmitryDulepov\Realurl\Decoder\UrlDecoder {
/**
* Decodes preVars into request variables.
*
* @param array $pathSegments
* @return array
*/
protected function decodePreVars(array &$pathSegments) {
$requestVariables = array();
if (count($pathSegments) > 0) {
$preVarsList = array_filter((array) $this->configuration->get('preVars'));
$previousValue = '';
foreach ($preVarsList as $preVarConfiguration) {
$this->decodeSingleVariable($preVarConfiguration, $pathSegments, $requestVariables, $previousValue);
if (count($pathSegments) == 0) {
break;
}
}
if (isset($requestVariables['L'])) {
$this->detectedLanguageId = (int) $requestVariables['L'];
}
elseif ($this->detectedLanguageId === 0) {
$defaultSysLanguageUid = (int) $this->configuration->get('init/defaultSysLanguageUid');
if ($defaultSysLanguageUid > 0) {
$this->detectedLanguageId = $defaultSysLanguageUid;
}
}
}
return $requestVariables;
}
}
ext_localconf.php:
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['DmitryDulepov\\Realurl\\Decoder\\UrlDecoder'] = array(
'className' => 'Vendor\\Ext\\Decoder\\UrlDecoder',
);
RealUrlConfiguration.php:
$TYPO3_CONF_VARS['EXTCONF']['realurl']['domain.de']['init']['defaultSysLanguageUid'] = 16;
$TYPO3_CONF_VARS['EXTCONF']['realurl']['domain.fr']['init']['defaultSysLanguageUid'] = 3;