On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • splittingred added a new parameter called language to the formit package.
    So just download the latest version of formit and set the language parameter
    • Hi,I put language property in my call but it doesn’t work... What am I doing wrong ?
      [[!FormIt? &hooks=`recaptcha,spam,email,redirect` &emailTpl=`MyEmailChunk`&emailTo=`myemail@xxx.xx`&redirectTo=`1`&validate=`name:required,email:email:required,subject:required,text:required:stripTags` &language=`fr`]]
      • You may need a core/components/formit/lexicon/fr/default.inc.php file
        (based on the core/components/formit/lexicon/en/default.inc.php file).
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
        • Thank you BobRay,
          I’ve translated the file. If a french speaking person could check it, it would be good.
          • GREAT!! Boy does that really make things a whole lot easier!! as always, you big guys go above and beyond!
            • Quote from: borizz at Oct 03, 2010, 09:54 AM

              ...
              2. Change FormIt so that you can pass in a language parameter. For this to work you need to edit the model/formit/formit.class.php file inside the formit component. The initialize method chould be changed like this:
              ...

              It works for Formit lexicon only. I need switch recaptcha messages too. So you should edit recaptcha model too in formit/model/recaptcha/formitrecaptcha.class.php

              From:
              function __construct(modX &$modx,array $config = array()) {
                  $this->modx =& $modx;
                  $this->modx->lexicon->load('formit:recaptcha');
              


              To:
              function __construct(modX &$modx,array $config = array()) {
                  $this->modx =& $modx;
                  $language = isset($config['language']) ? $config['language'] . ':' : '';
                  $this->modx->lexicon->load($language.'formit:recaptcha');
              



              • It's 2012, and i instaled recent MODX Revo with Babel and FormIt. Simple steps to translate to your language:

                All I had to do is duplicate core/formit/lexicon/en and changed it to core/formit/lexicon/pl

                In FormIt snippet i didn't change anything. Don't have to use &language parametr.
                I make a translation in Lexicon in Modx manager in Formit with new created lang PL.

                Refresh your cache, refresh your browser - and thats all! smiley You have multilingual site with translated Formit erros. (Just make sure your Babel is correctly configured)
                • Recently installed MODX 2.2.1 and FormIt 2.0.3.

                  Is adding, in my case, &language=`nl` enough?

                  Without the &language I get error messages like "This field is required"

                  With &language=`nl` added the error message is "Formit.field_required"

                  What is going wrong?

                  • I have exactly the same problem, would love to have a solution.
                    • Did you check in System->Lexicon if the dutch language is present in namespace formit?