We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31640
    • 100 Posts
    splittingred added a new parameter called language to the formit package.
    So just download the latest version of formit and set the language parameter
      • 30271
      • 19 Posts
      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=`[email protected]`&redirectTo=`1`&validate=`name:required,email:email:required,subject:required,text:required:stripTags` &language=`fr`]]
        • 3749
        • 24,544 Posts
        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
          • 30271
          • 19 Posts
          Thank you BobRay,
          I’ve translated the file. If a french speaking person could check it, it would be good.
            • 20014
            • 200 Posts
            GREAT!! Boy does that really make things a whole lot easier!! as always, you big guys go above and beyond!
              • 22874
              • 1 Posts
              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');
              



                • 38599
                • 3 Posts
                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)
                  • 39131
                  • 84 Posts
                  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?

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