We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8548
    • 104 Posts
    WORKING NOW
    Finaly made this work, the solution : don't use @INLINE and put all tpl in chunks!

    this is the final call that's working:

    [[!mmlCache?
      	&element=`BreadCrumb`
    	&id=`[[+id]]`
    	&currentCrumbTpl=`currentCrumbTpl`
    	&containerTpl=`containerTpl`
    	&homeCrumbTpl=`homeCrumbTpl`
    	&linkCrumbTpl=`linkCrumbTpl`
    	&showHomeCrumb=`0`
    	&includeTVs=`mml_ICM_longtitle,mml_ICM_pagetitle` 
      	&prepareTVs=`1` 
      	&processTVs=`1`
      	&tvPrefix=`` 
      	&prepareTVs=`1`
      	&loadModels=`migxmultilang`
      	&prepareSnippet = `mmlTranslatePdoToolsRow`
    	&showLog=`1`
    ]]


    linkCrumbTpl :
    <li><a href="[[++cultureKey]]/[[+link]]">[[+mml_ICM_longtitle:default=`[[+longtitle]]`]]</a></li>


    homeCrumbTpl :
    <li><a href="[[+link]]">[[++cultureKey]]/[[+mml_ICM_longtitle:default=`[[+longtitle]]`]]</a></li>


    currentCrumbTpl :
    <li><strong>[[+mml_ICM_longtitle:default=`[[+longtitle]]`]]</strong></li>


    containerTpl :
    <ol class="col-md-12 breadcrumb"><li><a href="[[++site_url]]" title="[[++cultureKey:is=`fr`:then=`Accueil`:else=`Home`]]">[[++cultureKey:is=`fr`:then=`Accueil`:else=`Home`]]</a></li>[[+crumbs]]</ol>


    Quote from: Egam at Sep 06, 2016, 06:38 PM

    when I use BreadCrumb

    I managed to get almost a translation breadcrum working.

    the Call :
    [[!mmlCache?
      	&element=`BreadCrumb`
    	&id=`[[*id]]`
    	&currentCrumbTpl=`@INLINE <li><strong>[[+mml_ICM_longtitle:default=`[[+longtitle]]`]]</strong></li>`
    	&containerTpl=`@INLINE <ol class="col-md-12 breadcrumb"><li><a href="[[++site_url]]" title="[[++cultureKey:is=`fr`:then=`Accueil`:else=`Home`]]">[[++cultureKey:is=`fr`:then=`Accueil`:else=`Home`]]</a> - [[+id]]</li>[[+crumbs]]</ol>`
    	&homeCrumbTpl=`@INLINE <li><a href="[[+link]]">[[+mml_ICM_longtitle:default=`[[+longtitle]]`]]</a> - [[+id]]</li>`
    	&showHomeCrumb=`0`
    	&includeTVs=`mml_ICM_longtitle` 
      	&prepareTVs=`1` 
      	&processTVs=`1`
      	&tvPrefix=`` 
      	&prepareTVs=`1`
      	&loadModels=`migxmultilang`
      	&prepareSnippet = `mmlTranslatePdoToolsRow`
    ]]

    has you can see in the containerTpl I manualy made it translate the Home, if I don't do that I get only the last child translated (the current page).
    like this : Home >> Recherche scientifique >> Students
    has you can see, only the (manualy translated home) and the current page are translated, else they stay in french.

      • 8548
      • 104 Posts
      WORKING NOW
      Finaly made this work, the solution : don't use @INLINE and put all tpl in chunks!

      this is the final call that's working:

      [[!mmlCache?
        	&element=`BreadCrumb`
      	&id=`[[+id]]`
      	&currentCrumbTpl=`currentCrumbTpl`
      	&containerTpl=`containerTpl`
      	&homeCrumbTpl=`homeCrumbTpl`
      	&linkCrumbTpl=`linkCrumbTpl`
      	&showHomeCrumb=`0`
      	&includeTVs=`mml_ICM_longtitle,mml_ICM_pagetitle` 
        	&prepareTVs=`1` 
        	&processTVs=`1`
        	&tvPrefix=`` 
        	&prepareTVs=`1`
        	&loadModels=`migxmultilang`
        	&prepareSnippet = `mmlTranslatePdoToolsRow`
      	&showLog=`1`
      ]]


      linkCrumbTpl :
      <li><a href="[[++cultureKey]]/[[+link]]">[[+mml_ICM_longtitle:default=`[[+longtitle]]`]]</a></li>


      homeCrumbTpl :
      <li><a href="[[+link]]">[[++cultureKey]]/[[+mml_ICM_longtitle:default=`[[+longtitle]]`]]</a></li>


      currentCrumbTpl :
      <li><strong>[[+mml_ICM_longtitle:default=`[[+longtitle]]`]]</strong></li>


      containerTpl :
      <ol class="col-md-12 breadcrumb"><li><a href="[[++site_url]]" title="[[++cultureKey:is=`fr`:then=`Accueil`:else=`Home`]]">[[++cultureKey:is=`fr`:then=`Accueil`:else=`Home`]]</a></li>[[+crumbs]]</ol>


      Quote from: Egam at Sep 06, 2016, 06:38 PM

      when I use BreadCrumb

      I managed to get almost a translation breadcrum working.

      the Call :
      [[!mmlCache?
        	&element=`BreadCrumb`
      	&id=`[[*id]]`
      	&currentCrumbTpl=`@INLINE <li><strong>[[+mml_ICM_longtitle:default=`[[+longtitle]]`]]</strong></li>`
      	&containerTpl=`@INLINE <ol class="col-md-12 breadcrumb"><li><a href="[[++site_url]]" title="[[++cultureKey:is=`fr`:then=`Accueil`:else=`Home`]]">[[++cultureKey:is=`fr`:then=`Accueil`:else=`Home`]]</a> - [[+id]]</li>[[+crumbs]]</ol>`
      	&homeCrumbTpl=`@INLINE <li><a href="[[+link]]">[[+mml_ICM_longtitle:default=`[[+longtitle]]`]]</a> - [[+id]]</li>`
      	&showHomeCrumb=`0`
      	&includeTVs=`mml_ICM_longtitle` 
        	&prepareTVs=`1` 
        	&processTVs=`1`
        	&tvPrefix=`` 
        	&prepareTVs=`1`
        	&loadModels=`migxmultilang`
        	&prepareSnippet = `mmlTranslatePdoToolsRow`
      ]]

      has you can see in the containerTpl I manualy made it translate the Home, if I don't do that I get only the last child translated (the current page).
      like this : Home >> Recherche scientifique >> Students
      has you can see, only the (manualy translated home) and the current page are translated, else they stay in french.

        • 4172
        • 5,888 Posts
        you don't need mmlCache anywhere inside mmlCache
        mmlCache is just used in the template for caching the output of the differend languages.

        Make me wonder, that it is working with BreadCrumb.

        BreadCrumb can't work with all the properties, which are for pdoTools.

        For me, this is working:


        [[!pdoCrumbs? 
            &includeTVs=`mml_pagetitle,mml_menutitle` 
            &loadModels=`migxmultilang`
            &prepareSnippet = `mmlTranslatePdoToolsRow`
        ]]


        I think, this doesn't work for you, because you have your translated fields not prefixed just with mml_ but with mml_ICM

        mmlTranslatePdoToolsRow - snippet is looking for fields with just mml_ - prefix
        If has a value, it uses this value, if not, it uses the value of the field without mml_

        For example the field pagetitle is used in the main-language.
        If you are at another language, it tries to find the field with name mml_pagetitle with the translated value.

        If you have other prefixes, you will need a customized version of mmlTranslatePdoToolsRow

        you don't need constructs like that

        [[+mml_ICM_longtitle:default=`[[+longtitle]]`]]


        but you can just use [[+longtitle]], if you have the suggested prefix of mml_

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

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 8548
          • 104 Posts
          Thanks Bruno,

          it all make sens, I'll look in testing all of this.

          I appreciate your time, cheers!
            • 8548
            • 104 Posts
            Hi Bruno,

            I've tried changing all my mml_ICM_longtitle to mml_longtitle all over the site (changed my tv too), I must be doing something not good cause I still get ERROR 500 when I try this call sad

            will try on new install for futur testing.

            Quote from: Bruno17 at Sep 07, 2016, 07:57 PM



            [[!pdoCrumbs? 
                &includeTVs=`mml_pagetitle,mml_menutitle` 
                &loadModels=`migxmultilang`
                &prepareSnippet = `mmlTranslatePdoToolsRow`
            ]]

              • 6506
              • 35 Posts
              I am having real issue with this translation plugin.

              I am using MODX 2.5.1. Have followed all the guides and tutorials here

              https://docs.modx.com/revolution/2.x/case-studies-and-tutorials/create-a-multilingual-website-with-migxmultilang

              and here

              https://github.com/Bruno17/migxmultilang/blob/master/readme.md

              and gone through all of this thread but still can't find any solution that works.

              My site is here

              http://characterworld.rms-dev.com/

              I have a pdo menu like this

              [[!pdoMenu?
              &startId=`0`
              &level=`1`
              &includeTVs=`mml_pagetitle,mml_menutitle`
              &prepareTVs=`1`
              &tvPrefix=`tv.`
              &loadModels=`migxmultilang`
              &prepareSnippet = `mmlTranslatePdoToolsRow`
              &tplOuter =`wfOuter`
              &tpl=`wfParentRow_multilang`
              ]]

              which is the basic call. Plus added a pagetitle and a bit of content just to see if it was all working. I am using the generated TV's that are applied when you run through the tutorial. I have made sure in system settings that the PdoTools settings are correct and tried all sorts to try and get it to work but to no avail.

              It will translate the settings on one page but then not on any of the others. If I update something, then it seems to break altogether. At the moment, the about us page is the only page that will translate and to get that to work I have to go to the resource, choose German in the tranlation tv's and check and uncheck the published button on any of the Tv's that I want translated and then save.

              This is the errors that it generates

              [2016-10-28 14:13:16] (ERROR @ /home/rmsdevco/public_html/characterworld/core/xpdo/xpdo.class.php : 643) Could not load class: mmlFormtabsTemplate from mysql.mmlformtabstemplate.
              [2016-10-28 14:13:16] (ERROR @ /home/rmsdevco/public_html/characterworld/core/xpdo/xpdo.class.php : 761) mmlFormtabsTemplate::load() is not a valid static method.
              [2016-10-28 14:13:16] (ERROR @ /home/rmsdevco/public_html/characterworld/core/xpdo/xpdo.class.php : 643) Could not load class: mmlFormtabs from mysql.mmlformtabs.
              [2016-10-28 14:13:16] (ERROR @ /home/rmsdevco/public_html/characterworld/core/xpdo/xpdo.class.php : 761) mmlFormtabs::load() is not a valid static method.

              Is this an issue to do with 2.5.1 or is there something I have not done or does something in the snippet need to change? Any help greatly appreciated. Thanks [ed. note: DannyFranks last edited this post 7 years, 5 months ago.]
                • 6506
                • 35 Posts
                An update on the above. After trying various fixes none of which worked I ran a clean install of MODX 2.3.2 and went through the set up again. All now seems to work so it must be something in version 2.5.1 which breaks the translation.
                  • 51216
                  • 35 Posts
                  Quote from: DannyFranks at Nov 08, 2016, 06:00 PM
                  An update on the above. After trying various fixes none of which worked I ran a clean install of MODX 2.3.2 and went through the set up again. All now seems to work so it must be something in version 2.5.1 which breaks the translation.

                  Can confirm. Finding many errors with migxmultilang in 2.5.1.
                  I'm ditching it. Going to use Babel instead