We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3499
    • 20 Posts
    There are no ideal approach which fits any case. I’m completely agree with hk_modx about the real world of multilingual solutions, full automation is unattainable right now =)

    I have a question about the resource organization in "context" solution. I have (for example: JavaScript) resources which are the same for all languages, do I have to duplicate them or there is another way?
      • 12236
      • 48 Posts
      Digital Butter - MODX Premiere Partners Reply #12, 13 years, 8 months ago
      Quote from: BlackBar at Aug 16, 2010, 09:13 AM

      There are no ideal approach which fits any case. I’m completely agree with hk_modx about the real world of multilingual solutions, full automation is unattainable right now =)

      I have a question about the resource organization in "context" solution. I have (for example: JavaScript) resources which are the same for all languages, do I have to duplicate them or there is another way?

      Could you use symlinks for that so that you only need to maintain one actual piece of content? http://rtfm.modx.com/display/revolution20/Symlink
        • 12028
        • 152 Posts
        Quote from: BlackBar at Aug 16, 2010, 09:13 AM

        I have a question about the resource organization in "context" solution. I have (for example: JavaScript) resources which are the same for all languages, do I have to duplicate them or there is another way?

        When it comes to css, javascripts, and other static files there are common in all the languages contexts, you could place them on a cookieless sub domain, and maybe use minify to compress the css and javascripts. With that you will also gain some speed.
          - A small step for mankind, so why not take two...

          Working with web production, graphic design/workflow, photo and education - but are trying to get a life in between!
          • 32237
          • 4 Posts
          Hi Guys,

          Im pretty new to Modx, ive made a couple of dev sites and few production sites but my experience is fairly limited. I have a couple of bilingual projects lined up and would really like to use Revo for them but am unsure of how to do so.

          I have attempted to follow the instructions outlined here: http://churn.butter.com.hk/posts/2010/08/internationalization-in-modx-revolution.html which arent to disimilar to what SplittingRed et al. are discussing on this thread.

          I am trying to set up a test site locally on XAMPP (on windows) and have a site structure like this:

          Web (context)
          -home

          Cy (Welsh context)
          -hafan

          As I am developing locally im not sure how to setup subdomains, how would I set it up so that my site URLS would be soemthing like http://localhost:85/mynewsite/en/home and http://localhost:85/mynewsite/cy/hafan & then tweak the swticher code to work with these style URLs rather than subdomain URLs, at present I am having no luck at all even being able to view my Cy context let along navigate to it- or is there something fundamental that Im missing here?

          any help would be greatly appreciated smiley

          Cheers,
          • hi Welshfusion,

            you might be interested in that thread : http://modxcms.com/forums/index.php/topic,51346.0.html

            I hope it’ll help.
              • 32237
              • 4 Posts
              Cheers Romain,

              i’ll have a good read through this and post with the outcome!

                • 32237
                • 4 Posts
                Hey Guys,

                I have tried to implement the solution in Romains link but still seem to be having issues. I have set the context values and created the plugin. Please see attached screendumps of my Context settings and here is my plugin code:

                <?php<br />$pieces = explode(’/’, trim($_REQUEST[$modx->getOption(’request_param_alias’, null, ’q’)], ’/’), 2);<br />if (count($pieces) > 0) {<br />    switch ($pieces[0]) {<br />        case ’cy’:<br />            if (isset($pieces[1])) {<br />                $_REQUEST[$modx->getOption(’request_param_alias’, null, ’q’)] = $pieces[1];<br />            } else {<br />                $_REQUEST[$modx->getOption(’request_param_alias’, null, ’q’)] = ’’;<br />            }<br />            $modx->switchContext(’cy’);<br />            break;<br />        default:<br />            break;<br />    }<br />}


                The plugin listens for onHandleRequest.

                If I try to visit URL: http://localhost:85/grayswaste/web/ or http://localhost:85/grayswaste/cy/ I get a 404 error.

                Have I missed something?

                Cheers,

                WF
                  • 31410
                  • 66 Posts
                  hello
                  iam also getting the same page not found error
                  can someone help me here

                  thanks
                  venu
                    • 31410
                    • 66 Posts
                    hey Welshfusion
                    from my experience with same problem i understood you have miised 3 steps

                    1.create context folder(for you its cy)in the base directory
                    3.copy the main index.php file to cy/ folder
                    3.search @include(dirname(__FILE__) . ’/config.core.php’); line and replace it with @include(dirname(dirname(__FILE__)) . ’/config.core.php’);
                    and also replace $modx->initialize(’web’); with $modx->initialize(’cy’);

                    iam sure it will work now
                    if not let me know

                    thanks
                    • I’m having a big problem with the context name. I have the context name in Hebrew (עברית), and in trying to edit the context to add the cultureKey in its settings, the name is converted to HTML entities and the context cannot be found. The name shows up fine in the Tree, and appears to be just plain text in the database as well. (Revo 2.0.3)
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org