Static Translation not working for UI page
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
We have custom "On Hold" UI action on incident form which opens a pop-up through UI page to enter details, we tried adding ${} to texts and create entries in sys_ui_message table but static translation is not working.
Below is the HTML code snippet from UI page
<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>
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
58m ago
that syntax won't work on UI pages
you need to use g:message
something like this, I haven't tried this
<div>
<label for="textarea" id="selectOptions">
<g:message key="on_hold.reason" />
</label>
<p>
<select name="onHold" id="onHoldReason" onchange="onHoldChoiceMandatory()" class="form-control">
<option value="noneValue" role="option">
<g:message key="none" />
</option>
<option value="awaitingCaller" role="option">
<g:message key="awaiting.caller" />
</option>
<option value="awaitingVendor" role="option">
<g:message key="awaiting.vendor" />
</option>
<option value="awaitingChange" role="option">
<g:message key="awaiting.change" />
</option>
<j:if test="${jvar_showUserOffboarding}">
<option value="userOffboarding" role="option">
<g:message key="user.offboarding" />
</option>
</j:if>
</select>
</p>
</div>
💡 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

