- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 04:49 AM
Hello,
The email notification that's being sent to the user whenever he is mentioned in a record, is always translated to a specific language (let's say french, whatever). The mail script uses a couple of gs.getMessage() calls, the messages are present in the sys_ui_message table, but no matter the user or his language preference, it's always translated. I was able to log the user and the session language that runs the email scripts. It's System, and the language is fr, which is different from the instance default language. Why doesn't it take into account the user that's mentioned, and always picks up the System user language. Has anyone had a similar issue ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 05:03 AM
Hi @Victor53
You can use gs.getMessageLang() instead of gs.getMessage(), where you can specify the language you want. For example,
gs.getMessageLang('hello', 'en'); //English
gs.getMessageLang('hello', 'fr'); //French
If you want it to be more dynamic based on the user, you can glide the user record and get his/her language preference and pass it to the function.
Please mark my answer helpful and accept as a solution if it helped 👍✔️
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 05:03 AM
Hi @Victor53
You can use gs.getMessageLang() instead of gs.getMessage(), where you can specify the language you want. For example,
gs.getMessageLang('hello', 'en'); //English
gs.getMessageLang('hello', 'fr'); //French
If you want it to be more dynamic based on the user, you can glide the user record and get his/her language preference and pass it to the function.
Please mark my answer helpful and accept as a solution if it helped 👍✔️
Anvesh