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

    Uup ... I found it. The code can be download from here :
    http://modxcms.com/forums/index.php/topic,32807.0.html

    NOT from this page :
    http://modxcms.com/forums/index.php/topic,32807.15.html

    I’ll try it. Thanks.
    Best Regards,
    - pedma -
      • 22958
      • 50 Posts
      Hi AHHP,

      I’m new in Modx. Need help please .... smiley I’ve download your plugin .. (thanks for your plugin ... smiley made it run, but what next ?

      This is what I did :
      1) Login to Manager (using Modx 0.9.6.3) , Goto : Resources -> Manage Resources -> Plugins -> New Plugin
      GENERAL :
      Plugin Name : EasyLingual
      Description : plugin to create multilingual sites v0.99
      Plugin Code (php) :
      // RTL languages. Add yours...
      $RTLs = array("en", "de", "it");
      etc ...etc ...
      $modx->documentObject[’content’]; => DON’T FORGET ’;’ at the end .... IMPORTANT !!

      CONFIGURATION :
      Plugin Configuration : &default_lang=default language;string;en
      Default Language : en

      SYSTEM EVENTS :
      OnLoadWebDocument => Ticked at this
      OnLoadWebPageCache => Ticked at this

      Click SAVE

      2) Go to Template Variable -> New Template Variable :
      Variable name : decontent
      Cation : decontent
      Description : deutsch content
      Input Type : TextArea
      Sort Order : 0

      Template Access :
      Minimal Template => Ticked on this

      Click SAVE

      Create the same template Variable with the name : depagetitle, itcontent, itpagetitle, encontent, enpagetitle

      3) Go To Template -> click at minimal template
      Change from [*#content*] to [*[%lang%]content*]


      It shows nothing (the page without error, but still the same as before).

      *) What I need to do next ? Chunks / Snippets ?
      Can you give me example of that ?

      Many Thanks.
      Best Regards,
      - pedma -


        • 22958
        • 50 Posts
        Hi All forum friends,

        I change the template to Stargazer, see : http://modxcms.com/Stargazer-Template-2152.html

        4) At Stargazer template I add this (Resources -> Manage Resources -> Templates -> Stargazer) - after Header:

        <div id="mylang">
        | <a href="[~[*id*]~]&lang=en" title="English">English</a> | <a href="[~[*id*]~]&lang=de" title="Deutsch">Deutsch</a> | <a href="[~[*id*]~]&lang=it" title="Italiano">Italiano</a> |
        </div>

        Click SAVE.


        And add this to css file (assets\templates\stargazer\style.css) :

        #mylang {
        width: 900px;
        height: 20px;
        position: absolute;
        left: 40px;
        }

        Save this css file.

        5) Create a document, assign Stargazer template to it.

        TESTING :

        From FrontEnd, I can see :
        | English | Deutsch | Italiano |

        If I click at English , at browser tab for Url I see : http://localhost/index.php?id=11&lang=en
        If I click at Deutsch, I see : http://localhost/index.php?id=11&lang=de
        And as I click at Italiano, I see : http://localhost/index.php?id=11&lang=it

        I just get the same content for these 3 links ....

        It seems that this plugin work, but HOW TO TRANSLATE the content with the same id (=11) ?
        Shall I create Chunk/Snippets/TV ? If yes, can any body give me example for this ?

        Many Thanks.
        Best Regards,
        - pedma -


          • 16545
          • 358 Posts
          You should better read the plugin explanation first, for every language you must create TV associated with used template.
          So start from the beginning again.

          Quote from: pedmajungne at Feb 12, 2009, 11:16 AM


          I just get the same content for these 3 links ....

          It seems that this plugin work, but HOW TO TRANSLATE the content with the same id (=11) ?
          Shall I create Chunk/Snippets/TV ? If yes, can any body give me example for this ?

          Many Thanks.
          Best Regards,
          - pedma -



            • 22958
            • 50 Posts
            HI Labasus,

            Thanks for your reply. I have create 6 TVs (please see point 2) at my previous post) :

            ----------------------------------------------
            2) Go to Template Variable -> New Template Variable :
            Variable name : decontent
            Cation : decontent
            Description : deutsch content
            Input Type : TextArea
            Sort Order : 0

            Template Access :
            Minimal Template => Ticked on this => now change to Stargazer.

            Click SAVE

            Create the same template Variable with the name : depagetitle, itcontent, itpagetitle, encontent, enpagetitle

            --------------------------------------------------------

            In that TVs, what should I give in these fields :
            Input Option Values: , Default Value: & Widget: ??

            At this time, I just put NOTHING there .... is it the problem ? What should be in those fields ?

            Thanks.
            Best Regards,
            - pedma -


              • 20413
              • 2,877 Posts
              Tvs are the same as adding extra fields to your documents. When you have created a tv and assigned it to the same template you can see the extra field showing WHEN editing the document settings.

              http://www.modxcms.com/documentation.html
                @hawproductions | http://mrhaw.com/

                Infograph: MODX Advanced Install in 7 steps:
                http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                • 22958
                • 50 Posts
                HI MrHaw and other friends,

                Thanks for your reply. Sorry, I’m a newbie ...
                I found the problem : As I copy/paste the plugin, it was not complate ... sad , as I wrote in point 1) about adding the ’;’ tag, there was actually some more code after it .... sad ... Sorry ...
                I just downloaded the plugin again, copy/paste it again to plugin ....

                Now I can see the Field / Text Area , below the original document (6 new TextArea, it was from the TV I created before)... smiley

                Thanks for all of your help.
                Best Regards,
                - pedma -
                  • 22958
                  • 50 Posts
                  Hi All,

                  I have successfully translated the content to different language at BackEnd. But at FrontEnd the content is still the Original one (the same content for the 3 languages), although the URL is changed ... sad

                  Do I missed something ? Shall I create Chunks/Snippet to make it work ?

                  Thanks.
                  Best Regards,
                  - pedma -
                    • 22958
                    • 50 Posts
                    Hi All,

                    I found the problem : The page was cacheable .... sad
                    I edited the document, at Page Settings I unticked the Cacheable !!
                    It works now ... smiley

                    Thanks AHHP & other friends ...
                    Nice Plugin !!

                    Just a question :
                    Is it possible to use my old multilingual data ? I need so many weeks/months to type it one by one to Modx system. Is it a ’converter’ for this or any tips ?

                    Example of Product table:
                    --------------------------------------------------------------------
                    | Product_Id | Product_Desc_en | Product_Desc_de | Product_Desc_it |
                    --------------------------------------------------------------------
                    | 1 | Some English desc | Some German desc | Some Italian desc |
                    | 2 | .....


                    Many Thanks.
                    Best Regards,
                    - pedma -
                      • 16545
                      • 358 Posts
                      This question is off topic, better create new one for this task or just outsource some guru to do that.
                      Last stuff will not takes lot of time:)


                      Quote from: pedmajungne at Feb 14, 2009, 04:33 AM

                      Just a question :
                      Is it possible to use my old multilingual data ? I need so many weeks/months to type it one by one to Modx system. Is it a ’converter’ for this or any tips ?

                      Example of Product table:
                      --------------------------------------------------------------------
                      | Product_Id | Product_Desc_en | Product_Desc_de | Product_Desc_it |
                      --------------------------------------------------------------------
                      | 1 | Some English desc | Some German desc | Some Italian desc |
                      | 2 | .....