We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32052
    • 38 Posts
    Hello,

    I’m new in modx, so far everything’s good until I came along with the multilingual site.
    I was wondering maybe you guys can help me out. I’m kinda lost on step where you need to put a
    currentlanguage.php file in assets/languages directory. I’m aware of the international ISO though
    I didn’t know what to put inside the php file

    <?php
    ...???
    ?>

    With that problem I was still able to see my main site with problems:
    1. double display of LANGUAGE MENU
    i.e. English English
    Deutsch Deutsch
    2. If I click the any of the language menu I get a 404 error
    i.e. URL/gb was not found
    URL/de was not found
    3. If I click my about us page in main menu i get a 404 error also
    i.e. URL /de/about-us.html was not found...and so with the other links

    What seems to be my problem?

    Thank you.



      • 349
      • 76 Posts
      Hi Weaksnick,

      to the first part of your question:
      You don´t need those files to get my solution working. They are just for adding placeholders that you might need in all languages.
      For example in en.php:
      $modx->setPlaceholder("to_top",'go to top of page');

      So you can place a "top of page" link in your template for all languages.

      Don´t know what it is with the doubled menu, but it seems, that you forgot to set the alias of the root containers (English, Deutsch) to the ISO Code of the corresponding language.
      Please read all steps again, and follow them correctly, then you get it to work.

      Hope i could help.
        • 32052
        • 38 Posts
        Quote from: weaknsick at Aug 10, 2010, 06:13 PM

        Hello,

        I’m new in modx, so far everything’s good until I came along with the multilingual site.
        I was wondering maybe you guys can help me out. I’m kinda lost on step where you need to put a
        currentlanguage.php file in assets/languages directory. I’m aware of the international ISO though
        I didn’t know what to put inside the php file

        <?php
        ...???
        ?>

        With that problem I was still able to see my main site with problems:
        1. double display of LANGUAGE MENU
        i.e. English English
        Deutsch Deutsch
        2. If I click the any of the language menu I get a 404 error
        i.e. URL/gb was not found
        URL/de was not found
        3. If I click my about us page in main menu i get a 404 error also
        i.e. URL /de/about-us.html was not found...and so with the other links

        What seems to be my problem?

        Thank you.


        Thanks for your reply aceman, im really not into the coding stuffs and was
        in a bit of a mess when implementing the solution. So far my site structure looks like this:

        ROOT
        ENGLISH gb TV: gb
        home gb TV: gb
        aboutus gb TV: gb
        content gb TV: gb
        DEUTCSH de TV: de
        home de TV: de
        aboutus de TV: de
        ... and so on

        Did I made it right at first? I have pages that has TV’s with the country codes alias?

        The one that I mentioned with the doubled language menu looks like this:
        gb english
        de deutsch

        I also get the 404 errors. When you hover your mouse to the language menu it’s pointing to
        domainname.com/gb.html for english (results to an error)
        domainname.com/de.html for deutcsh (results to an error)




          • 9738
          • 21 Posts
          Quote from: weaknsick at Aug 11, 2010, 06:47 AM


          Thanks for your reply aceman, im really not into the coding stuffs and was
          in a bit of a mess when implementing the solution. So far my site structure looks like this:

          ROOT
          ENGLISH gb TV: gb
          home gb TV: gb
          aboutus gb TV: gb
          content gb TV: gb
          DEUTCSH de TV: de
          home de TV: de
          aboutus de TV: de
          ... and so on

          Did I made it right at first? I have pages that has TV’s with the country codes alias?

          The one that I mentioned with the doubled language menu looks like this:
          gb english
          de deutsch

          I also get the 404 errors. When you hover your mouse to the language menu it’s pointing to
          domainname.com/gb.html for english (results to an error)
          domainname.com/de.html for deutcsh (results to an error)

          weaknsick it sounds like your server isn’t configured for friendly url’s. Just to confirm that the pages are working can you try going to yoursite.com/index.php?id=x (where x is the id of 1 of your pages).
            • 32052
            • 38 Posts



            weaknsick it sounds like your server isn’t configured for friendly url’s. Just to confirm that the pages are working can you try going to yoursite.com/index.php?id=x (where x is the id of 1 of your pages).


            Hi FishCake,

            Thank you for the reply, when i tried doing this "yoursite.com/index.php?id=1" it shown my website including some other page id’s.
            Does this mean i have to speak with my webhost or was it inside the modx configuration?

            Cheers!
              • 9738
              • 21 Posts
              Quote from: weaknsick at Aug 11, 2010, 06:18 PM



              Hi FishCake,

              Thank you for the reply, when i tried doing this "yoursite.com/index.php?id=1" it shown my website including some other page id’s.
              Does this mean i have to speak with my webhost or was it inside the modx configuration?

              Cheers!

              It depends largely on your host, do you know what webserver is used? if it’s Apache it should be as simple as renaming the "ht.access" file found in the root folder to ".htaccess" if it is IIS then you will most likely need to contact your host.

                • 32052
                • 38 Posts

                It depends largely on your host, do you know what webserver is used? if it’s Apache it should be as simple as renaming the "ht.access" file found in the root folder to ".htaccess" if it is IIS then you will most likely need to contact your host.

                It’s definitely an apache server. What will I do with the ht.access file? What will I need to change?

                Thanks
                  • 32052
                  • 38 Posts

                  It depends largely on your host, do you know what webserver is used? if it’s Apache it should be as simple as renaming the "ht.access" file found in the root folder to ".htaccess" if it is IIS then you will most likely need to contact your host.

                  It’s working now! smiley I just change the ht.access to .htaccess. The only problem that I currently looking at now is the pages did not pick-up the template. It was just a plain site with text and links.
                  Was it is because I made the folder to use a blank template?

                  Thanks fish! your a big help!

                  Cheers!
                    • 32052
                    • 38 Posts
                    Hello again,

                    Did anyone here solved their Ditto issues?
                    Mine was displaying 404 ERROR www.mysite.com/de/de/news/19.html

                    My ditto goes like this
                    [!Ditto? &parents=`14` &display=`3` &paginate=`1` &paginateAlwaysShowLinks=`0` &tpl=`news` !]

                    [!Reflect?config=`wordpress` &targetID=`23` &getDocuments=`1` &dittoSnippetParameters=`parents:14`&id=`wp`!]

                      • 9738
                      • 21 Posts
                      This isn’t a problem with this solution as such but hopefully someone here will have experienced it and knows how to fix it.

                      I’ve just created a pretty big document tree and duplicated it but every document is unpublished, is there a way to duplicate them published?

                      As mentioned it’s a pretty big document tree and I still have to duplicate it another 2 times for further languages.

                      Cheers.