We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28311
    • 9 Posts
    Hello to all smiley
    I have 2 questions:
    First from stupidity i didn’t put a password to my database :’(, and i want to put one.
    After i put an password to the database and In manager/includes/config.inc.php i change:
    $database_password = "my_password"; it will work?

    Second i want to translate my site from English to my native language and i was thinking to do like this :
    copy all the site in to a sub folder and after that translate the text.
    I read somewhere that modx save the text in the database, so if i translate the text that means the English site will be translated in my native language too?


    Tanks for support grin



      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: sslider999 at Dec 13, 2006, 10:17 AM

      First from stupidity i didn’t put a password to my database :’(, and i want to put one.
      After i put an password to the database and In manager/includes/config.inc.php i change:
      $database_password = "my_password"; it will work?
      It should yes. Give it a try...you may have problems with the cache, but if you go straight to the manager login after doing so, everything should be fine; just make sure you refresh your the site after logging in. If it doesn’t log in, post back here...

      Quote from: sslider999 at Dec 13, 2006, 10:17 AM

      Second i want to translate my site from English to my native language and i was thinking to do like this :
      copy all the site in to a sub folder and after that translate the text.
      I read somewhere that modx save the text in the database, so if i translate the text that means the English site will be translated in my native language too?
      I’ve created sites in multiple languages by putting all my english content under an english folder at the top level, and then duplicating it for each language. You then have a copy of your english site which can be translated to another language. You might be able to accomplish similar by having translations of each english page be children of that page, and writing a plugin to use session vars to decide which page to load based on user language preferences. When you duplicate the site though, you will get unique documents, so there is no issue with overwriting your English content.
        • 28311
        • 9 Posts
        Hello,
        At the first problem everything was OK after making the changes grin

        And the second i didn’t quite understand huh
        This is the first time i came in contact with php and i didn`t understand how to do it
        A little more help is appreciated smiley
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Create a document, "English", as a container/folder document in Manager. Move all of your english documents to that container/folder document, so they are under it in the Tree.

          Now duplicate the parent "English" document. It will duplicate the whole branch, children and all. Edit the duplicated "English" document, rename it "Francais" (or whatever). Now you can edit each page under it and translate them. If you like, you can set these documents to not show in menu until you have them translated.

          When making menus, use the "UltimateParent" snippet for startId. Your language menu can be hand-coded since it won’t be changing. If you do want to use a menu snippet for it, use startId=`0` &level=`1`.

          In your two top-level documents put the "FirstChildRedirect" snippet. That way when a user chooses a language, instead of being given the content of your top-level container, he’ll be sent to its first child, which should be that language’s home page.
            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
            • 28311
            • 9 Posts
            Quote from: sottwell at Dec 13, 2006, 10:50 PM

            Create a document, "English", as a container/folder document in Manager. Move all of your english documents to that container/folder document, so they are under it in the Tree.

            Now duplicate the parent "English" document. It will duplicate the whole branch, children and all. Edit the duplicated "English" document, rename it "Francais" (or whatever). Now you can edit each page under it and translate them. If you like, you can set these documents to not show in menu until you have them translated.

            When making menus, use the "UltimateParent" snippet for startId. Your language menu can be hand-coded since it won’t be changing. If you do want to use a menu snippet for it, use startId=`0` &level=`1`.

            In your two top-level documents put the "FirstChildRedirect" snippet. That way when a user chooses a language, instead of being given the content of your top-level container, he’ll be sent to its first child, which should be that language’s home page.

            Hello again.
            I made the changes from the first 2 points, and now i`m stuck sad
            My site is www.supercarmania.com
            i use MODx 0.9.2.2 (rev 1923)
            and [Template] Greenery
            In the two top-level documents put the "FirstChildRedirect" snippet:
            [[UltimateParent? &id=`1` &top=`58`]] for English and [[UltimateParent? &id=`60` &top=`59`]] for Romanian
            For the menus i dident understand
            Quote from: sottwell at Dec 13, 2006, 10:50 PM

            When making menus, use the "UltimateParent" snippet for startId. Your language menu can be hand-coded since it won’t be changing. If you do want to use a menu snippet for it, use startId=`0` &level=`1`.
            So my menu shows only English and Romanian instead of showing the content of each document.
            I wait for an advice what to do next.
            Thk again.