A
A
Alexander Ivanov2018-08-18 15:00:54
MODX
Alexander Ivanov, 2018-08-18 15:00:54

Why is the RU context always displayed?

When you go to .site.ru/en/
He writes me that I'm in the context of RU
What could I have missed?
I create a multilingual version
Reference materials
https://www.youtube.com/watch?v=MgJmlP0pDSI
https://cat-art.ru/articles/multiyazyichnost-modx-revo
Index and htaccess
5b7809c1960f0799373345.png
settings Context settings
5b7809697f75d681040914.png
Plugin:

<?php
if($modx->context->get('key') != "mgr") {
/* Определяем текущий язык в cultureKey */
switch ($_REQUEST['cultureKey']) {
/* Переключаем контекст */
case 'en':
$modx->switchContext('eng');
break;
case 'fr':
$modx->switchContext('fr');
break;
/* Устанавливаем контекст по умолчанию */
default:
$modx->switchContext('web');
break;
}
// /* Очищаем GET-параметр чтобы не допустить появлении ссылки вида cultureKey=xy при генерации URL других компонентов */
// unset($_GET['cultureKey']);
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ivanov, 2018-08-18
@cimonlebedev

Deleted the plugin downloaded XRouting and it worked

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question