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

    I don't like the idea of being forced to use pdoTools, however.

    well, all translatable fields needs to be translated, if the field was translated, with fallback to the default-language, if not translated.

    This could be done completely with

    1. custom-snippets
    2. output-filters
    3. plugin
    4. existing tools

    I decided, because of performance,flexibility and fast implementation to use existing tools.
    I think, pdoTools does it well.


    What I also really don't like is working in a javascript pop up box.

    Again, because of flexibility and fast implemantation, I decided to use existing tools and to use MIGX to get it implemented into the manager.

    IMO, configuring forms with something like the MIGX - configuration is much more flexible and intuitive than trying to customize forms with form - customization.
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
    • Between MIGx and pdoTools, no need to re-invent any wheels.
        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
      • Quote from: sottwell at Feb 25, 2014, 05:44 AM
        no need to re-invent any wheels.
        One said https://twitter.com/StartupLJackson/status/174667330914234369 . grin
          Rico
          Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
          MODx is great, but knowing how to use it well makes it perfect!

          www.virtudraft.com

          Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

          Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

          Maintainter/contributor of Babel

          Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
          • 47811
          • 1 Posts
          Quote from: nomark at Jan 14, 2014, 09:57 AM
          We've been a longtime Babel-user and still use it in all our new projects. We checked the migxmutlilang addon but have some objections to use it. We made a pro's and con's list

          Cons:
          - There is no way to get unique URL prefixes for language-specific resources, eg: site.com/en/home, site.com/nl/home, site.com/de/home
          - There is no way to get a seperate domain name for a language, eg: site.com/home, site.nl/home, site.de/home (there is a possibility with a dirty htaccess hack, but that's not really what we want)
          - Can't use TV's
          - Can't use Wayfinder or getResources
          - We think an end-user will not experience it as logical
          - You always have all languages for a page. There's no possibility to make one page language-specific. You have to use all languages, even if you don't want to

          Pros:
          - A clean resource tree

          This led us to the the conclusion that we keep using Babel.

          Thanks for you report.

          You can language for multiple domain with change mml_initCulture.
          My solution is:

          Change mml_initCulture:
          if (!function_exists('clientLangDetect')) {
                  function clientLangDetect($modx)
                  {
                      /*$langs = array();
          
                      if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
                          # break up string into pieces (languages and q factors)
                          preg_match_all('/([a-z]{1,8}(-[a-z]{1,8})?)\s*(;\s*q\s*=\s*(1|0\.[0-9]+))?/i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $lang_parse);
          
                          if (count($lang_parse[1])) {
                              # create a list like "en" => 0.8
                              $langs = array_combine($lang_parse[1], $lang_parse[4]);
          
                              # set default to 1 for any without q factor
                              foreach ($langs as $lang => $val) {
                                  if ($val === '')
                                      $langs[$lang] = 1;
                              }
          
                              # sort list based on value
                              arsort($langs, SORT_NUMERIC);
                              return $langs;
                          }
                      }*/
          			 switch ($modx->getOption('http_host',null,'')) {
          			  case 'www.example.cz':
          				  return array("cs"=>"1");
          			  default:
          				  return array("en"=>"1");
          			  }
                  }
              }


          and

           $clientCultureKey = array_flip(array_intersect_key(clientLangDetect(), $languages));


          to

          $clientCultureKey = array_flip(array_intersect_key(clientLangDetect($modx), $languages));


          Now if client come from www.example.cz have Czech language page smiley.

            • 4172
            • 5,888 Posts
            @shorny
            Thanks for sharing!
            I would recommend, not to change the plugin mml_initCulture, but create a customized copy of the plugin and deactivate the original plugin.


            @nomark
            You see, all of the 'Cons' can be solved.
            Some of them, might need some custom-coding to solve them.





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

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 45206
              • 32 Posts
              Thanks for the comparison.
              For what I've understood, the choice is more a question of usage than purely technical.
              Babel and MIGXmultilang both have pros and cons.
              However, MIGXmultilang seems to be a little more flexible...

              Let me introduce a new subject of my concern and correct me if I'm wrong.
              With Babel, it is much more easier to manage ACL for different users, both from the front or the backend point of view.
              Is it possible with MIGXmultilang ? But maybe, my concern is not a common usage. In that case, it would be better to have two distinct websites or use Babel instead ?

              This thread is one year old.
              Are there something new that can make the right choice more obvious ?

              Thanks for your shares ?
              • Lately I've been using Lingua more. In some ways it's more like MIGX than Babel, but has its own advantages and drawbacks. [ed. note: sottwell last edited this post 8 years, 9 months ago.]
                  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
                  • 4172
                  • 5,888 Posts
                  what are your requirements, regarding permissions?
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 45206
                    • 32 Posts
                    Quote from: Bruno17 at Jul 28, 2015, 09:39 AM
                    what are your requirements, regarding permissions?

                    Is it possible for a translator to access only the translated part of a resource in the manager ?
                    For example, dutch people only access the dutch part that concerns them.

                    Another questions :

                    1. Is it possible for MIGXMultilang to switch between languages by IP using something like GeoIP ?
                      For example, someone coming from Netherlands gets the right translation even if he was calling the general .com ?
                    2. In the same way, is it possible to switch between languages via a select option ?
                    3. How would you do to serve dedicated datas from a custom table based on the language ?
                    4. And last but not the least, is it possible to not fallback to the default language for specified resources ? There are cases where some resources would not be published at all in a specified language.

                    Thanks for your help
                    [ed. note: jchirschy last edited this post 8 years, 9 months ago.]
                    • Hi all!!!

                      I'm currently working on my new site and I (finally!) decided to go from Evo to Revo! smiley

                      This new projects requires multilanguage so I decided to give a migxMultiLang a try!

                      I was following this tutorial https://rtfm.modx.com/revolution/2.x/case-studies-and-tutorials/create-a-multilingual-website-with-migxmultilang and everything seems ok UNTIL I need to test it on the front-end. It just gives me a blank page (view-source shows nothing)!
                      The problem starts when I do the "Step 6: Creating the Templates For The Front End"

                      Can anyone help me out a little bit?
                      migxMultiLang seems very promising and I don't want to "trash it" just because some minor error...
                        BASE - Web Design Studio
                        MODX Ambassador

                        Website