We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22448
    • 241 Posts
    Update: As is often the case it they problem was caused by something very simple.
    In this instance the translated Eform messages file had syntax errors and the parser was throwing errors.
    Fixing extra quotes and missing slashes made the problem go away.


    Hey all,

    i’m seeing a very strange behavior when trying to get Efrom to use translated message files.
    When i set &language=`(yams_mname)` as recommended by YAMS the contact page comes up completely blank. Looking at code reveals that there are only html and body tags on the page. Everything else is missing. I did not expect something this dramatic.
    Removing language setting brings the page back to life but it continues to use English error messages.

    I have 2 additional languages: simplified chinese and traditional chinese. The files have been already translated and placed in assets/snippets/eform/lang folder. The files are chinese.inc.php and chineset.inc.php.
    I have also created a new file in manager/includes/lang/chineset.inc.php which added ’chineset’ as a selectable language in the manager.

    YAMS language ids are: en, cs, ct, and language names are: english, chinese, chineset.

    It works for english but not for either of the chinese languages.

    Here’s the eform call:

    [!eForm? &language=`(yams_mname)` &formid=`ContactForm_(yams_id)` &tpl=`ContactForm_(yams_id)` &report=`ContactFormReport` &to=`[email protected],[email protected],[email protected]` &subject=`Site email: [+name+]` &thankyou=`ContactFormThankyou_(yams_id)` &protectSubmit=`1` &requiredClass=`required` &invalidClass=`invalid` &from=`[email protected]`  !]



    I’m against the wall here. Been troubleshooting this all day and can’t figure it out.
    Any help is very welcome.
      • 22851
      • 805 Posts
      Little niggles like that can be so frustrating! Glad you found what the problem was.
        YAMS: Yet Another Multilingual Solution for MODx
        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.