How to specify user's language in email script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2022 01:54 AM
Hi,
1. whenever we using ${field name} its showing Norwegian language, because its taking system default language that is Norwegian. is there any option to translate the language.
2. How to specify the user's language in email script? because in notification we are using email script and that is also showing system default language.
We created two separate notifications for Norwegian and English by specifying the condition, still its taking systems language whenever we using ${field}.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 07:53 AM
For messages you can use the API call:
var to_translate = 'Snow White is a {0}';
var language = 'de';
var parameter_arr = ['fairy tale'];
gs.getMessageLang(to_translate, language, parameter_arr);
Assuming the translations exist, this will return
Schneewittchen ist ein fairy tale
For field names, choices and translated texts and translated fields you need to use a GlideRecord
lookup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 07:56 AM
Clarification: that means you can't use ${field}
tokens, you need to use notification e-mail scripts instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 11:39 PM
No, I can use ${field} but its showing system default lanuage not an english.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2022 04:17 AM
When one says "you can't use" it does not necessarily mean that you will be unable to use, but it can also mean that you will be able to use, but it will not work.
So let me restate it: You will not be able to achieve translating things added to an e-mail using ${field}
tokens, you have to use notification e-mail scripts instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2022 01:29 AM
Aishwarya,
I actually posted about this very topic in a recent post on my blog here,
Many thanks,
Kind regards
Director of Globalization Deployment, Internationalization