We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    The @eval code goes into the "Default value" field when you create the TV.

    I wrote up a basic tutorial. See attached.
      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
      • 19889
      • 616 Posts
      so I basically have the following then:

      root
      -- language 1
      ----doc1
      ----doc2
      -- language 2
      ----doc1
      ----doc2

      where do I go from here?
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Sorry, you caught me in the middle of something and I clicked the wrong button. See my last post for a tutorial document.
          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
          • 19889
          • 616 Posts
          thank you so much - I think that helps a lot!
            • 24253
            • 125 Posts
            Hello Susan,

            I finally got to install your multilingual implementation, and it works perfectly, thanks a lot!

            I noticed that for the "HomeMenuItem" chunk, and other places where the [*lang*] was used, the friendly URLs disappeared.

            Don’t know if it can be solved in the TV itself, but it’s of course easy to call the TV like this in your template whenever friendly URLs are required:

            [~[*lang*]~]

            Thought, I’ll let you know ;-)

            Greetings,

            Remon
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I know that there are some quirks and bugs, but for the most part it works. The plugin (pass the lang variable via the URL query string) is very problematic at the moment; I recommend the cookie method until I can get it worked out.
                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
                • 32321
                • 29 Posts
                Quote from: sottwell at Oct 30, 2005, 07:22 AM

                I know that there are some quirks and bugs, but for the most part it works. The plugin (pass the lang variable via the URL query string) is very problematic at the moment; I recommend the cookie method until I can get it worked out.


                Hi Susan,

                I’ try to address all that i have done according to your specifications in the multilanguage.pdf and the codes from your posts regarding the multilingual support... The list is as follows.

                1. I created the tree menu identical to the one in the pdf file posted by you.

                2. I created the the [[SetLangCookie]] :
                // SetLangCookie snippet for ModX
                // set cookie with language ID
                // 08-28-2005
                // [email protected]
                $lang=$modx->documentIdentifier;
                setcookie("Language",$lang,time()+604800, "/", "", 0);

                3. I called this snippet at the beggining of each language home page/folder for example: *F indicates the folder just for info in this post.

                ---English F (Called the snippet in this folder)
                -----Fields F
                -----News F
                -----Support F

                ---German F (Called the snippet in this folder)
                -----Fields F
                -----Fields F
                -----Support F

                4. I created the [*lang*] TV exactly as shown in the pdf document
                @EVAL
                if($modx->documentObject[’parent’] == 0) {
                $lang=$modx->documentIdentifier;
                }
                else
                if(isset($_COOKIE[’Language’])) {$lang=$_COOKIE[’Language’];}
                else {$lang=$modx->config[’site_start’];}
                return $lang;

                5. I created the {{HomeMenuItem}} Chunk and,
                6. Homealone Snippet
                7. I created the CSSDropMenu

                and this is finaly the problem i run into not probably but certainly beacouse i am a beginner sad

                i am using the default modx template called the Minimal Template and i’m lost in where to call these snippets etc.
                It’s not the template that i had in mind ( I saw the http://www.bmptrans.ch/ template showing the languages on top menu and menu on left) that is what i need . for ex.

                ---------------------------------------------------------------
                (FolderMenu)
                Fields-------News-------Support (Language Menu)
                -------------------------------------------English-------German
                ---------------------------------------------------------------
                (Docs Menu) |
                DocsUnder Fields |
                |
                |
                |
                ________________________________________________________________________

                Please can you send me an example or the construct of the template which you used to call all these snippets. I know i might be asking allot and probably wasting ur time on these things, but i would really appreciate ur help. Thnx in advance.

                Please help.

                WhiteHat
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  In MODx terms this is pretty old. Most of it still applies, but I never use the HomeAlone snippet any more, TVs are much better. I suppose I should go over this and bring it up-to-date, for example I believe there is a version of DropMenu available that will include itself in the menu list for any document used as startDoc, so you wouldn’t need the additional item hard-coded in. In fact, between the FirstChildRedirect, and the creative use of weblinks, you can do just about any kind of menu you can imagine.
                    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
                    • 32321
                    • 29 Posts
                    Quote from: sottwell at May 10, 2006, 05:35 PM

                    In MODx terms this is pretty old. Most of it still applies, but I never use the HomeAlone snippet any more, TVs are much better. I suppose I should go over this and bring it up-to-date, for example I believe there is a version of DropMenu available that will include itself in the menu list for any document used as startDoc, so you wouldn’t need the additional item hard-coded in. In fact, between the FirstChildRedirect, and the creative use of weblinks, you can do just about any kind of menu you can imagine.

                    Hi Susan,

                    Thanks for your answer of yesterday. I did not realize what time it was untill later on when i got your PM--- Sorry about that. Anyway It would be great to have the DropMenu you mentioned.
                    I am looking forward to new posts from you regarding this issue. I will try and make the changes you mentioned yesterday hopefully I will be ok smiley .
                    Thnx again,
                    Whitehat
                      • 32321
                      • 29 Posts
                      Quote from: sottwell at May 10, 2006, 05:35 PM

                      In MODx terms this is pretty old. Most of it still applies, but I never use the HomeAlone snippet any more, TVs are much better. I suppose I should go over this and bring it up-to-date, for example I believe there is a version of DropMenu available that will include itself in the menu list for any document used as startDoc, so you wouldn’t need the additional item hard-coded in. In fact, between the FirstChildRedirect, and the creative use of weblinks, you can do just about any kind of menu you can imagine.

                      Hi again,

                      just some explanation i needed,

                      1. will i be using the default DropMenu Snippet or something else that will be compatible with the 3 menus that i need?

                      2. in the template the menus the snippet call will look like this right?

                      for the language menu is

                      [!DropMenu?startDoc=`0`&levelLimit=`1`!]

                      for the top menu is

                      [!DropMenu?startID=`[*TopMenuStart*]`&levelLimit=`1`!]


                      for the left menu is

                      [!DropMenu?startID=`[*LeftMenuStart*]`&levelLimit=`1`!]


                      3. The 2 Template variables inheriting the [*TopMenuStart*] and the [*LeftMenuStart*] when I create them the default value of the content would be this one

                      @INHERIT
                      and nothing more right?

                      4. What happens to the [*lang*] TV?

                      5. In each Language/Folder I will be calling the [[SetLangCookie]] Snippet.
                      -----------------------------------------------------------------------------

                      I did create the tree menu like discussed with you and duplicated everything.

                      I have used the CSSDropMenu Snippet (just copy Pasted the content in the DropMenu Snippet so the name of the snippet is still [[DropMenu]]
                      i have created and used the [*lang*] template variable.
                      I created and used the 2 TV-s TopMenuStart and LeftMenuStart

                      so finaly the the 3 menus don’t generate the fields that they should -- language Menu should display the English and German fields ----- Topmenu should display the folders under english or german according to lang ----- and left menu should display docs under topmenu folders depending on which one you click.
                      but in my case all 3 menus display English and German fields.

                      huh


                      Thnx again