<![CDATA[ different language for error messages? - MODX Community Forums]]> https://forums.modx.com/thread/?thread=47564 <![CDATA[Re: different language for error messages?]]> https://forums.modx.com/thread/47564/different-language-for-error-messages?page=4#dis-post-448628 amitpatil Dec 29, 2012, 12:20 PM https://forums.modx.com/thread/47564/different-language-for-error-messages?page=4#dis-post-448628 <![CDATA[Re: different language for error messages?]]> https://forums.modx.com/thread/47564/different-language-for-error-messages?page=4#dis-post-448624 suntrop Dec 29, 2012, 11:19 AM https://forums.modx.com/thread/47564/different-language-for-error-messages?page=4#dis-post-448624 <![CDATA[Re: different language for error messages?]]> https://forums.modx.com/thread/47564/different-language-for-error-messages?page=4#dis-post-448535 amitpatil Dec 28, 2012, 01:34 PM https://forums.modx.com/thread/47564/different-language-for-error-messages?page=4#dis-post-448535 <![CDATA[Re: different language for error messages?]]> https://forums.modx.com/thread/47564/different-language-for-error-messages?page=3#dis-post-448530
I replaced the string in this file and it works. It was on the front-end, not the manager. But I am wondering why formIt doesn't load the string from the DB?!

I also tried to copy "$modx->setOption('cultureKey', 'de');" into my formIt snippets, but it will still loads it from the PHP file.]]>
suntrop Dec 28, 2012, 12:13 PM https://forums.modx.com/thread/47564/different-language-for-error-messages?page=3#dis-post-448530
<![CDATA[Re: different language for error messages?]]> https://forums.modx.com/thread/47564/different-language-for-error-messages?page=3#dis-post-448211
The string is in the default.inc.php files there. I don't know why FormIt is not using that file when you set &language=`de`. Looking at the FormIt class file code, it should definitely load that file based on the &language setting.

If not, you might try setting this in the FormIt snippet:

$modx->setOption('cultureKey', 'de');


or this in the FormIt class file:

$this->modx->setOption('cultureKey', 'de');

]]>
BobRay Dec 24, 2012, 10:30 PM https://forums.modx.com/thread/47564/different-language-for-error-messages?page=3#dis-post-448211
<![CDATA[Re: different language for error messages?]]> https://forums.modx.com/thread/47564/different-language-for-error-messages?page=3#dis-post-448194
Lexicons aren't in the database, they are files. The Manager lexicon files are found in core/lexicon, while extras like FormIt would have their own lexicon files in their core/components/extra-name directories.]]>
sottwell Dec 24, 2012, 05:40 PM https://forums.modx.com/thread/47564/different-language-for-error-messages?page=3#dis-post-448194
<![CDATA[Re: different language for error messages?]]> https://forums.modx.com/thread/47564/different-language-for-error-messages?page=3#dis-post-448170 The error message is always "Fieldname is required". I don't know where the "is required" comes from and how to change it.
- there is 'de' translation in my lexicon
- I translated the english version as well
- locale settings are set to 'de' (locale and culture key)

I even can't find 'is required" within my database. Any suggestions?]]>
suntrop Dec 24, 2012, 02:36 PM https://forums.modx.com/thread/47564/different-language-for-error-messages?page=3#dis-post-448170
<![CDATA[Re: different language for error messages?]]> https://forums.modx.com/thread/47564/different-language-for-error-messages?page=3#dis-post-446607 jambek2003 Dec 11, 2012, 02:59 AM https://forums.modx.com/thread/47564/different-language-for-error-messages?page=3#dis-post-446607 <![CDATA[Re: different language for error messages?]]> https://forums.modx.com/thread/47564/different-language-for-error-messages?page=3#dis-post-443678
If I have no &language set in Formit, it works. If I set &language to `en` it works in English (obviously). Set it to anything else and it doesn't - I get the formit.field_required message.

Any ideas?]]>
bananayogi Nov 19, 2012, 05:06 AM https://forums.modx.com/thread/47564/different-language-for-error-messages?page=3#dis-post-443678
<![CDATA[Re: different language for error messages?]]> https://forums.modx.com/thread/47564/different-language-for-error-messages?page=3#dis-post-442650
What works perfectly for me is the following syntax for FormIt:

[[!FormIt?
   &hooks=`spam,email,redirect`
   &emailTpl=`contactTpl`
   &emailSubject=`Bericht verzonden via contact-formulier website`
   &emailTo=`info@mywebsite.nl`
   &validate=`naam:required,
      email:email:required,
      bericht:required:stripTags`
   &redirectTo=`27`
]]


Change following settings in System -> System Settings
-locale nl_NL
-cultureKey nl

Good luck!]]>
mewolari Nov 08, 2012, 10:32 AM https://forums.modx.com/thread/47564/different-language-for-error-messages?page=3#dis-post-442650