We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12352
    • 101 Posts
    Hi, I need this to work today (22th of december 2010) or I’m in real big trouble... So please help me!

    I tried to install following internationalization option:
    http://churn.butter.com.hk/posts/2010/08/internationalization-in-modx-revolution.html

    My ’web’ context works fine, but I’m getting a ’Error 503 Site temporarily unavailable’ error on the other language contexts:

    contexts: web, nl, fr, de
    domains: www.domain.com, nl.domain.com, fr.domain.com, de.domain.com

    copied index.php and core.config.php to the subfolders nl, fr, de on the server and changed the following line in index.php:
    $modx->initialize('web'); 

    $modx->initialize('nl'); 


    Added the cultureKey and site_url to all the contexts and installed following gateway plugin:

    <?php
    //make sure our plugin does not run on the mgr context (the manager)
        if($modx->context->get('key') != "mgr"){
            //grab the current domain from the http_host option
            switch ($modx->getOption('http_host')) {
                case 'www.domain.com':
                    //switch the context
                    $modx->switchContext('web');
                    //set the cultureKey
                    $modx->setOption('cultureKey', 'en');
                    break;
                case 'nl.domain.com':
                    //switch the context
                    $modx->switchContext('nl');
                    //set the cultureKey
                    $modx->setOption('cultureKey', 'nl');
                    break;
                case 'fr.domain.com':
                    //switch the context
                    $modx->switchContext('fr');
                    //set the cultureKey
                    $modx->setOption('cultureKey', 'fr');
                    break;
                case 'de.domain.com':
                    //switch the context
                    $modx->switchContext('de');
                    //set the cultureKey
                    $modx->setOption('cultureKey', 'de');
                    break;
                default:
                    // Set the default language/context here
                    $modx->switchContext('web');
                    $modx->setOption('cultureKey', 'en');
                    break;
            }
        }?>


    Already tried to clear the cache, but I’m still getting the 503 error
    For now there are no .htaccess files and friendly urls are disabled. I’m using Revo 2.06, but had the same problem in 2.05

    Am I missing something? something wrong with the gateway plugin?


      Don't believe anything you read on the net. Except this.
      • 21838
      • 284 Posts
      Maybe it has to do with the if statement (mgr context if)...
      Look at this thread, too: http://modxcms.com/forums/index.php/topic,58906.0.html
        MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
        • 12352
        • 101 Posts
        sorry, still the same error

        I’m trying this one:
        http://modxcms.com/forums/index.php/topic,51346.0.html

        Thanks for the fast reply by the way!
          Don't believe anything you read on the net. Except this.
          • 21838
          • 284 Posts
          Okay, it’s not making sense for me what you’re doing here.

          You do the subfolder solution for subdomains?
          Did you try my(!) working solution (without separate index.php)?

          Or, how is your vhost configuration of your subdomains?
            MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
            • 12352
            • 101 Posts
            Yeah, I know it’s a bit confusing but I’m on a deadline here, did an upgrade of revo again and chose the context in subfolder solution without subdomains, I think this is better for the final result of the site.

            It works now and I can move on to my deadline

            I will test the subdomain solution later on...
              Don't believe anything you read on the net. Except this.
              • 21838
              • 284 Posts
              So what you’ve actually done to get it work for now?
                MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
                • 12352
                • 101 Posts
                I deleted all contexts and settings and started all over again, the site is not online for now, but I need it to generate some XML-files in different languages for an Indesign-newsletter, which is due for tomorrow.

                After I deleted all previous settings, I did a Revo upgrade and followed the instructions of following thread:
                http://modxcms.com/forums/index.php/topic,52869.0.html

                Now it works like a charm, with friendly urls and the new Babel plugin:
                http://modxcms.com/extras/package/781


                  Don't believe anything you read on the net. Except this.