getMessage in UI page not working

keepintouch_kir
Giga Contributor

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!

11 REPLIES 11

madanm7786
Mega Guru

Hi Kiran,



Replace $[gs.getMessage('incident_survey_msg')] with ${gs.getMessage('incident_survey_msg')} and try




Thanks,


Maddy


Hi Maddy.



I did that but it didn't work.


Make sure you change the language in settings to test for different language.


Yes i did that's when i realised its not working for other langauges