How to translate the error message An error has occurred while handling the request.

0
Hi there, My default language is Japanese, but error message "An error has occurred while handling the request." is still English.  I done the followings, - translate system texts - Batch translate for all modules when I search word 'An error has' in my project ( use Find(Ctrl+F))  the find result is none. Anyone any idea how to translate this?   Thanks in advance, Satomi
asked
3 answers
4

Hi Satomi,

there IS a 'workaround' possible which is not the prettiest solution but until a 'global error handler' idea is implemented like Ronald suggested this could be an alternative. However use this at your own risk :-)

1) download the HTMLSnippet widget from the appstore (if not already in the project)
2) place the widget somewhere in your master layout (or on every page)
3) set the content type to "Javascript"

The content of the snippet should be:

mx.onError = function (msg) {
    mx.ui.error("Ooops, something went wrong here. You broke it!");
    return false;
};

Of course you would want to change the text to a suitable and translated text for your users. The snippet's content can also be altered depending on the language you set in the modeler as it is a page/layout element (so it can be translated to any language that is in your project)

 

answered
3

Hi Satomi,

 

The error message you are explaining sounds like the mendix default error message. I'm not sure if you can change the language for that, but one work around would be to implement  error handling. This way you can show a custom message (in japanese) and not the mendix default. 

 

Here is a link to the mendix documentation on error handling

https://docs.mendix.com/howto/logic-business-rules/set-up-error-handling

answered
2

And see also this idear (Be able to set a global error handler): https://forum.mendix.com/link/ideas/469

Regards,

Ronald

 

answered