We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30223
    • 1,010 Posts
    I find it a problem to copy the whole site before you start translating. If you have a one man operated fairly static site that’s ok perhaps but with a frequently changing site with multiple contributors, who are not necessarily the translators things can become quite messy pretty quickly. By the time a whole section is translated a significant amount of the original has already changed.

    Instead I’ve implemented a very similar system with a folder per language and a cross-reference table, except that only the page (or a small group of pages) currently being translated is copied over. A simple plugin checks and serves a translated page if it is available. I use a customised menu script that makes the same checks. If a visitor has chosen a particular language the menu-items with a translated page will be translated and the rest will be shown in the default language.

    It’s true this can be produce a bit of a miss-match site for a while but in practice my experience is that nobody is too bothered by that and the site in all languages stays much more up to date.
      • 10076
      • 1,024 Posts
      Quote from: doze at Jan 19, 2007, 01:44 PM

      Quote from: NameCat.com at Jan 19, 2007, 01:26 PM

      ??? Sorry guys... I am still not clear on this answer to my first question...
      I realize that each language is in its own folder, but within each folder you still have to call Wayfinder in a different way, no? And since Wayfinder is called in the template, it seems you’d have to either make a slightly different template for each language, or somehow turn wayfinder into a template variable, right? undecided
      Use [!Wayfinder? &startId=`[[UltimateParent]]`!] and it always lists the menu from the top folder of each language..
      1
      Well that is a great solution!

      tnx
        • 19554
        • 59 Posts
        Wikified: http://wiki.modxcms.com/index.php/How_to_make_Multi_Lingual_Site
        Please update with any later changes. Thanx!
          • 7291
          • 129 Posts
          good day,

          (using latest versions of php, apache... wayfinder 2.0, modx-0.9.5)

          *Problem getting Chinese and English languages to work. All I want is the home page in English and when someone clicks on the Chinese flag, goes directly to the Chinese home page(the Chinese/English flags would always take user to home page of that language, don’t care about going to specific pages)

          This is what I have so far:

          1) Downloaded icons and uploaded to assets/images. Both are 16x11px in size
          2) Created snippet "Redirect"
          3) Created snippet "Languages" and changed:
          $langnames = array(
          "en" => "English",
          "zh" => "Chinese"
          );
          4) Create TV called "Languages" with type "text", and associated with all templates
          5) Edited templates to call Languages snippet. I have 6 templates which all use the same chunk{{header}}:
          <div id="languages"> [[Languages]] </div>
          <div id="ajaxmenu"> [[Wayfinder?startId=`1` &fullLink=`1` &outerTpl=`mh.OuterTpl` &innerTpl=`mh.InnerTpl` &rowTpl=`mh.RowTpl` &innerRowTpl=`mh.InnerRowTpl` &firstClass=`first` &hereClass=``]] </div>
          <div id="banner"></div>
          </div>

          my css looks like:
          #languages {
          margin-top: 5px;
          position: relative;
          float: right;
          width:50px;
          z-index:999;
          padding-right: 35px;
          _margin-top: 66px;
          }

          Do I have the correct call in the template chunk, and is there anything wrong with the css in terms of size?
            [center]-- smiley --[/center]
            [center]New View Media - Custom Website Design[/center]
            [center]Custom Website Design & Marketing = Strategic Business![/center]
            • 727
            • 502 Posts
            What is the problem you are seeing?

            Andy
              • 7291
              • 129 Posts
              problem= I don’t know what i’ve done wrong but I can not even see the language flags and can not link to the other language page
                [center]-- smiley --[/center]
                [center]New View Media - Custom Website Design[/center]
                [center]Custom Website Design & Marketing = Strategic Business![/center]
                • 7291
                • 129 Posts
                6) My menu in manager looks like this, and all are published with page settings checked for everything(Capital and chinese letters =show in menu)They are all assigned to one of 6 templates, menu looks like this:

                en (108)___________________0 menu index, with blank template and no content. Is
                this what is meant by creating an empty document?
                Home Page(1)_______________2 menu index , main home page for English site
                Currently have [[Wayfinder?startId=`1`….] and works good
                +ABOUT US (33)_____________1 menu index
                +SERVICES (39)______________2
                +NEWS & REPORTS (52)_______6
                +SUCCESS STORIES (15)________7
                +CONTACT US (6)_____________9
                404 - Document Not Found (7)_ 11
                RSS Feed (11)_______________12
                Request an Account (5)_______13
                [*loginName*] (4)____________14
                Search Results (8)____________15
                [*loginName*] (37)___________16
                Email Newsletter (69)_________17
                Thank You (46)______________18
                zh (109)____________________0 menu index , with blank template and no content
                Chinese Home Page(78)_______3 menu index , main home page for English site
                +税法草案 (87)_______________1 menu index
                +1000万借出家 (96)__________2
                +2006年美国人 (100)_________6
                +人类“性香 (85)______________7
                +美国 (79)___________________9
                404 - Document Not Found (7)_ 11
                RSS Feed (11)_______________12
                Request an Account (5)_______13
                [*loginName*] (4)____________14
                Search Results (8)____________15
                [*loginName*] (37)___________16
                Email Newsletter (69)_________17
                Thank You (46)______________18
                Start (70)___________________1 menu index. Currently have no template assigned.
                Do I need to assign one? The only thing I have in here is document content: [[Redirect?id=`2`]]


                …So right now my homepage comes up as English and the Wayfinder menu works great when calling as [[Wayfinder?startId=`1`….] for every template section. If I turn it to [[Wayfinder?startId=`UltimateParent`….] I get an error. I also have a separate Wayfinder call on secondary pages that lists the submenus for about us, services, etc..This also works good using [[Wayfinder?startId=`33` or ‘39’ or whatever sub menu is desired for a section.

                How can I use ultimate parent for such a Wayfinder menu structure?


                Also on my home page I can not see any flag image or words with the way I’m calling the snippet at the moment. I tried linking in template href…but that didn’t work.

                Can someone point me in the proper direction?
                  [center]-- smiley --[/center]
                  [center]New View Media - Custom Website Design[/center]
                  [center]Custom Website Design & Marketing = Strategic Business![/center]
                  • 727
                  • 502 Posts
                  So you have the images "assets/images/en.gif" and "assets/images/zh.gif"? They must be in those locations.
                  If you view your page source in your browser, does anything appear where you placed the Languages snippet?

                  At a minimum you should see a <a href=...</a>. If not then the Languages snippet is either incorrect or not being called or the languages template variable uses an incorrect format. It should be something like "zh=5" for an english page.

                  Andy
                    • 7291
                    • 129 Posts
                    at the moment I do not see anything in the top right corner where I want the language to be
                      [center]-- smiley --[/center]
                      [center]New View Media - Custom Website Design[/center]
                      [center]Custom Website Design & Marketing = Strategic Business![/center]
                      • 727
                      • 502 Posts
                      Are you looking at the page source, like I suggested?
                      Did you check the gif locations and names?

                      Andy