getMessage in UI page not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2017 12:34 AM
HI Administration All,
I have modified OOB UI page "assessment_take2" as per user requirement. This was for adding custom translations for a message. Code is like below :
<j2:if test="$[GlideMobileExtensions.getDeviceType() == 'doctype']">
<div class="notification notification-info">
<j2:if test ="${task_table=='Incident'}">
$[gs.getMessage('incident_survey_msg')]
</j2:if>
<a onClick="openTaskOverlay(event)" class="related-task-link">${gs.getMessage('${task_record}')}</a>
<button data-dismiss="alert" class="btn btn-icon close icon-cross">
<span class="sr-only">Close</span>
</button>
</div>
</j2:if>
The above getMessage is not working for other languages except English after adding the <j2:if test ="${task_table=='Incident'}"> condition. For english, message is showing up. I have added translations already in messgae table but it is not working Any help is highly appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2017 12:42 AM
Hi Kiran,
Replace $[gs.getMessage('incident_survey_msg')] with ${gs.getMessage('incident_survey_msg')} and try
Thanks,
Maddy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2017 12:52 AM
Hi Maddy.
I did that but it didn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2017 12:56 AM
Make sure you change the language in settings to test for different language.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2017 01:49 AM
Yes i did that's when i realised its not working for other langauges