client script function getMessage() does not return expected translated text on Service Portal and WorkspaceDescription The getMessage() function is not returning expected translated text when client script is execute in Portal or Workspace context.The first time the function is called it is returning the English text (key value).The second time the function is called it is returning the expected translated text (based on the current selected language) getMessage() can be used to display text in different places the platform. Sometimes the translations for the text found inside of getMessage() does not get translated as expected. EXAMPLE: Catalog Client Scripts containing an alert that would not get translated in portal function onChange(control, oldValue, newValue, isLoading) { if(newValue == '1'){ alert(getMessage('Test : English version')); }} The image below shows how the "alert(getMessage('Test : English version'))" will look like in action on a instance in Portuguese mode: Release or EnvironmentAll releases.CauseBy design, Service Portal and Mobile client scripting environments do not support synchronous use of getMessage(). However, a getMessage() with a callback function can be used to translate text from getMessage(). To see an example of how the translation can be done, see the solution section next.ResolutionThis is a sample code that would work with the Example given in the Symptoms section of this article. Replace the "alert(getMessage('Test : English version'))" by the following: getMessage('Test : English version', function(msg){alert(msg);});Additional InformationService Portal and client scripts