We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16544
    • 86 Posts
    No idea how to change the default language. In eform.inc.php, on line 56, there is something related to it but I try changing english to other language and it didn’t work:
    #include default language file
    	include_once($snipPath."lang/english.inc.php");
    
    	#include other language file if set.
    	$form_language = isset($language)?$language:$modx->config['manager_language'];
    	if($form_language!="english" && $form_language!='') {
    		if(file_exists($snipPath ."lang/".$form_language.".inc.php"))
    			include_once $snipPath ."lang/".$form_language.".inc.php";
    		else
    			if( $isDebug ) $debugText .= "<strong>Language file '$form_language.inc.php' not found!</strong><br />"; //always in english!
    	}

    What am I doing wrong? Thanks! undecided
      I had fainted, unless I had believed to see the goodness of the LORD in the land of the living.
      • 16544
      • 86 Posts
      After some reading I found out that I have to use the &language parameter, so I put the &language=`es` (it is a Spanish site) in the eForm call, [!eForm? ... !] and is not working. I’m using modx 1.0.5 and modx_charset utf-8. Any help? undecided Thanks.
        I had fainted, unless I had believed to see the goodness of the LORD in the land of the living.
        • 8609
        • 607 Posts
        from the code there it does look like your parameter needs to be &language=`spanish` which I know you tried already undecided . I’m getting this from the line:

        if(file_exists($snipPath ."lang/".$form_language.".inc.php"))
        include_once $snipPath ."lang/".$form_language.".inc.php";

        I looked in the lang folder inside the eform folder and the file is spanish.inc.php. So that should work. But I’ve never used it, hopefully someone who has will come along and clarify,
          • 16544
          • 86 Posts
          Solved! Googling about it found this grin http://wiki.modxcms.com/index.php/Multilanguage_eForm. Thank you very much einsteinsboi wink
            I had fainted, unless I had believed to see the goodness of the LORD in the land of the living.
            • 8609
            • 607 Posts
            Ah, perfect!! There WAS a solution out there somewhere smiley
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I’ve saved that page as a .pdf (Print->PDF->Save As PDF; gotta love a Mac) and added it to my growing collection of documentation. I have a link to a zip archive of the collection here.
                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