On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • 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=`panguhotel@gmail.com,info@panguhotel.com,duty.manager@panguhotel.com` &subject=`Site email: [+name+]` &thankyou=`ContactFormThankyou_(yams_id)` &protectSubmit=`1` &requiredClass=`required` &invalidClass=`invalid` &from=`noreply@panguhotel.com`  !]



    I’m against the wall here. Been troubleshooting this all day and can’t figure it out.
    Any help is very welcome.
    • 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.