Need error message in Japanese language.

Yasin Shaik11
Tera Contributor

Hi All,

 

 var DamagedDepart = g_form.getValue('u_damaged_system_user_department');
    if (newValue != DamagedDepart) {
        g_form.addInfoMessage('User and manager information is different');
    } else if (DamagedDepart == newValue) {
        g_form.clearMessages();
        if (g_form.getValue('u_company') != '' && g_form.getValue('u_organization_company')!='') {
            if (g_form.getValue('u_company') != g_form.getValue('u_organization_company')) {
                g_form.addInfoMessage('User and manager information is different');
            }
        }
    }

 

The above client script error message is coming for the English users and if the user language is japanese then the error message should be japanese.

How we can do this configuration.

1 ACCEPTED SOLUTION

It's not quite correct. Change it into this:

g_form.addInfoMessage(getMessage('Admin_error_message'));

 

Then create two (or more) messages to translate/use this message, like screenshots below, :
I don't understand Japanese, so I've created messages in english, and in my native language (swedish)

english-message.png

 

not-english-message.png

View solution in original post

8 REPLIES 8

OlaN
Giga Sage
Giga Sage

Hi,

To translate the information message, you'll need to create a translation [sys_ui_message], and then call the message like the following:

g_form.addInfoMessage(getMessage('some_message_key_here'));

 

If the user has set their language to english, then the english message will appear,

and if the user has set their language to any other language, then that message (if it exists) will appear.

@OlaN 

Thanks for your response. 

 

I have written like this, but it is not working.

g_form.addInfoMessage('User and manager  organization information is different',getMessage('Admin_error_message'));

 

Community Alums
Not applicable

@Yasin Shaik11 ,

what's the error you're getting ??

Community Alums
Not applicable

@Yasin Shaik11 ,

It should be ("XYZ"+getMessage('Admin_error_message'));