We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28532
    • 29 Posts
    Hello
    I am designing a Spanish website and have successfully installed the SPForm plug in. Needless to say I need the viewable text content in Spanish. Have translated the prompts but cannot see how/where to access the js error messages to be able to translate them.
    Any guidance is greatly appreciated. THANKS.

    Also having trouble seeing the Captcha images. I have installed the plugin and used the call up code as given by Bob in a previous post. Also heard about GD libraries. Since it seems to involve more than just downloading the 2 packages, is there any post or tutorial that will explain the full process of installation to get the SPForm and Captcha working?
    MANY THANKS !
    In fact is the SPForm safe enough without Captcha?

    Steveed
      Steveed[br /]
      New to Modx
      Working with Rev 2.0.7-pl
      • 3749
      • 24,544 Posts
      If Captcha is installed, you should be able to turn it on in SPForm by adding &requireVerify=`1` to the SPForm snippet tag. The mathstring option is on by default. You can turn it off with &useMathString=`0`, but I recommend leaving it on. It’s much more secure than regular Captcha.

      The language strings should all be avaliable in System -> Lexicon Management by selecting either the captcha or spform namespace. Your changes will survive an upgrade. All the langauge strings should be there. If you see one on the screen that’s not present in Lexicon Management, let me know and I’ll check on it. I’ll need an exact quote of the string.

      If you’d like to do a full translation, copy the core/components/spform/lexicon/en directory to core/components/spform/lexicon/es and translate away (same for captcha). I’d be glad to include the es files in the next releases. Be sure to use UTF-8 and unix-style line endings for the files you edit.
        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
        • 28532
        • 29 Posts
        Many thanks Bob.
        Will try to do a complete translation soon as i can and send you a copy.

        Is there an easy way to make the form sticky so that if users get the captcha wrong and hit the back button (after they’re taken to the error message) they dont have to type their message all over again??

        MANY THANKS
        Steve


          Steveed[br /]
          New to Modx
          Working with Rev 2.0.7-pl
          • 28532
          • 29 Posts
          Bob
          Please find Spansih versions of DEFAULT file for Captcha and SPform.
          Steve
            Steveed[br /]
            New to Modx
            Working with Rev 2.0.7-pl
            • 3749
            • 24,544 Posts
            Quote from: Steveed at May 04, 2011, 03:01 PM

            Bob
            Please find Spansih versions of DEFAULT file for Captcha and SPform.
            Steve

            That’s great! Could you also do the properties.inc.php file for SPForm? Otherwise, Spanish-language users will see blank property descriptions when they edit the snippet.

            Could you give me your name, also, so I can give you credit in the files?

            Thanks! grin

              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
              • 28532
              • 29 Posts
              Okay Bob will do soon as i can.
              Any chance you can help me out with making the SPform sticky so users don’t have to re-write everything if they’re taken to an error page.
              Thanks
              Steve
                Steveed[br /]
                New to Modx
                Working with Rev 2.0.7-pl
                • 28532
                • 29 Posts
                Bob
                Please ignore my previous posts as I wish to summarise my problems in this one.

                1. I have uploaded the spanish files I sent you to the modx folder core/components/spform/lexicon/ for spform and captcha respecitvely, i am able to see the "es" version in the Lexicon Management grid with all the equivalent Spanish values.
                PROBLEM is when it wont stay in the spanish version, every time I view the site the Lexicon has reverted back to "en".
                Is there something I need to set or save ...i dont see any save option in the page.??

                2. Is there a way to make the SPForm sticky so that users dont have to re-type their message when returning from an error page?

                MANY THANKS
                Steve
                  Steveed[br /]
                  New to Modx
                  Working with Rev 2.0.7-pl
                  • 3749
                  • 24,544 Posts
                  1. There’s some missing code in the snippet that should select the language (I wrote it a long time ago, before I was very smart about using multiple languages). A workaround might be to set the cultureKey system setting to ’es’ (or create cultureKey context setting if the Spanish language files are in a different context). Let me know if that works.

                  The true fix would be to replace the following line in the spform.inc.php file (around line 37):

                  $modx->lexicon->load('spform:default');


                  with this code:

                  $language = !empty($spfconfig['language'])  ? $spfconfig['language'] . ':' : '';
                  $this->modx->lexicon->load($language . 'spform:default');
                  

                  and add &language=`es` in the snippet tag.

                  2. I’m not sure, but I think that’s a browser setting. It is sticky for me in Chrome, but not in Firefox.
                    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
                    • 28532
                    • 29 Posts
                    Bob
                    I changed the code in the spform.inc.php file and re-set the call to [[!SPForm?&requireVerify=`1`;&language=`es`]] but still no luck, what I dont get is that i see the ’es’ option in the Lexicon Management grid and all the spanish translation but it wont save it. It always reverts back to ’en’ when I move away and come back.
                    Is my call up code correct? Any other thoughts?

                    Also the same thing happens with the Capthcha in ’es’ would U have to change some corresponding php code in the captha folder?

                    Thanks
                    Steve
                      Steveed[br /]
                      New to Modx
                      Working with Rev 2.0.7-pl
                      • 3749
                      • 24,544 Posts
                      Are the resources all in the ’web’ context, or do you have a separate context for the es pages?

                      Did you try setting the cultureKey System Setting to es? I’m starting to think that’s the best method if it works.

                      Unfortunately, I have zero experience with multi-language sites, so someone else may be able to provide better information.
                        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