Translation in UI page
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
The following is a code snippet from a ui page, how to I modify the code to make the texts translatable. for eg: the text: "On Hold Reason" or its choices below. ${} is not working btw.
<div>
<label for="textarea" id="selectOptions">On Hold Reason</label>
<p>
<select name="onHold" id="onHoldReason" onchange="onHoldChoiceMandatory()" class="form-control">
<option value="noneValue" role="option">--None--</option>
<option value="awaitingCaller" role="option">Awaiting Caller</option>
<option value="awaitingVendor" role="option">Awaiting Vendor</option>
<option value="awaitingChange" role="option">Awaiting Change</option>
<j:if test="${jvar_showUserOffboarding}">
<option value="userOffboarding" role="option">User Offboarding</option>
</j:if>
</select>
</p>
</div>
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
this worked for me.
See this and enhance
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<div>
<g:evaluate jelly="true">
var messages = {
'user_offboarding': gs.getMessage('user.offboarding'),
'awaiting_vendor': gs.getMessage('awaiting.vendor'),
'awaiting_change': gs.getMessage('awaiting.change'),
'awaiting_caller': gs.getMessage('awaiting.caller')
}
</g:evaluate>
<select name="onHold" id="onHoldReason" onchange="onHoldChoiceMandatory()" class="form-control">
<option value="noneValue" role="option">--None--</option>
<option value="awaitingCaller" role="option">${messages.awaiting_caller}</option>
<option value="awaitingVendor" role="option">${messages.awaiting_vendor}</option>
<option value="awaitingChange" role="option">${messages.awaiting_change}</option>
<option value="userOffboarding" role="option">${messages.user_offboarding}</option>
</select>
</div>
</j:jelly>
Messages
Output: choices shown in French
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Regards,
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Here is the post with your solution . Hoe it helps you.
