We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4080
    • 139 Posts
    I saw that most of the threads on the topic of i8n with MODx are from 2008 or older so I’m creating a new topic (admins, let me know if my questions belong elsewhere).

    I’m just starting my first multilingual site (US English and French) and I’m looking for advice on the best way to go about it. I know there’s some documentation but I wanted to get some opinions from individuals with experience doing this. It looked to me like YAMS is the best route but it appears that there may be a bit of a learning curve? Please keep in mind that I’m a front-end designer guy and not a PHP whiz—although I do know the very basics.

    Thanks in advance for your input. The MODx community rules.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      My very first multilanguage site was done very simply, with four top-level resources (English, French, Italian, German), and each "branch" contained the resources for that language.

      These top-level resources themselves were used to generate the language menu, and contained a snippet to set a cookie with the resource ID to identify the language the user selected. Another snippet redirects to the first child, which is that language’s "home" page.

      Another snippet was used to retrieve the cookie value for use in Wayfinder as the startId for the main menu, and also for use in any snippets that required a language to be specified for including a language file

      The second two-language site I did used much the same method, with the addition of a TV for the alternate language that was used to hold the resource ID of the page’s opposite language resource; this way each page included a link to the same page in the other language. In the case of "News" pages, since they may not exist in both languages, I used the resource ID of the other language’s main News page.

      http://wiki.modxcms.com/index.php/Make_Multi_Lingual_Site
        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
        • 4080
        • 139 Posts
        Susan, thank you so much for the reply! This is very helpful. These appears to be a more straightforward approach for front-end guy vs. YAMS. Out of curiosity have you worked with YAMS before?
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          No, but I am now, and am also documenting my experiences with it. Interesting.

          I built that four-language site before I wrote the original UltimateParent snippet, so for the vast majority of cases the cookie isn’t even necessary; just use the UltimateParent snippet as the value for the Wayfinder startId, as well as the basis for any other language-specifier needed in any other snippets.
            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
            • 4080
            • 139 Posts
            Excellent! I’ve got it all working now. I’ll be interested to see what your feedback is using YAMS. I ended up using a simple "Parent" snippet though in Wayfinder since UltimateParent returns the initial "Language > en" or "Language > fr" and whatnot. Either way. This is what I needed and thanks once again.
            smiley
              • 36731
              • 13 Posts
              Hi Brian,

              Could you please post your feedback about the solution used for your website.

              i’m very interesting in !

              thanks


              -->french wink

                • 4080
                • 139 Posts
                Sure thing! Here’s the tutorial I followed. It’s mainly having a duplicate of the site in another language and using a TV to tell each page what it’s "sister" page is in the other language(s). Worked like a charm for me for famn[dot]org but the damn site for a FRENCH IMMERSION SCHOOL never even got translated to Français. Dumb. I’m pretty sure there’s much better ways to do this in Revo and probably plenty of great info out there about it. Hope this helps! smiley

                http://wiki.modxcms.com/index.php/Make_Multi_Lingual_Site