Answer the question
In order to leave comments, you need to log in
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
settings Context settings
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question