langauge from the cultureKey request var */
                  
                  
                      switch ($_REQUEST['cultureKey']) {
                  
                  
                          case 'nl':
                  
                  
                              /* switch the context */
                  
                  
                              $modx->switchContext('nl');
                  
                  
                              setlocale(LC_ALL, $modx->getOption('locale'));
                  
                  
                              break;
                  
                  
                          default:
                  
                  
                              /* Set the default context here */
                  
                  
                              $modx->switchContext('web');
                  
                  
                              setlocale(LC_ALL, $modx->getOption('locale'));
                  
                  
                              break;
                  
                  
                          }
                  
                  
                          /* unset GET var to avoid
                  
                  
                           * appending cultureKey=xy to URLs by other components */
                  
                  
                          unset($_GET['cultureKey']);
                  
                  
                  }
                  
                  
                  дописал, теперь работает, если кому нужно будет)
                  
                  
                
Такие штуки лучше сюда https://modx.pro/development выкладывать.
Обсуждают сегодня