Internationalise text inside a UI Script when it is a Widget DependencyIssue <!-- div.margin{ padding: 10px 40px 40px 30px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:2; } table.internaltable { white-space:nowrap; text-align:left; border-width: 1px; border-collapse: collapse; font-size:14px; width: 85%; } table.internaltable th { border-width: 1px; padding: 5px; border-style: solid; border-color: rgb(245, 245, 245); background-color: rgb(245, 245, 245); } table.internaltable td { border-width: 1px; padding: 5px; border-style: solid; border-color: #E0E0E0; color: #000000; } .title { color: #D1232B; font-weight:normal; font-size:28px; } h1{ color: #D1232B; font-weight:normal; font-size:21px; margin-bottom:-5px } h2{ color: #646464; font-weight:bold; font-size:18px; } h3{ color: #000000; font-weight:BOLD; font-size:16px; text-decoration:underline; } h4{ color: #646464; font-weight:BOLD; font-size:15px; text-decoration:; } h5{ color: #000000; font-weight:BOLD; font-size:13px; text-decoration:; } h6{ color: #000000; font-weight:BOLD; font-size:14px; text-decoration:; } ul{ list-style: disc outside none; margin-left: 0; } li { padding-left: 1em; } --> Description This article explains how to internationalise a string inside a UI Script when that UI Script is being used as a dependency for a Service Portal widget. The documented getMessage(messageKey, callback) method is not available on Service Portal, so instead we will use the i18n Angular module. Please make sure you have followed the proper steps for creating a widget dependency and a Service Portal complaint UI Script by following these documentations first: Create a widget dependencySupported client script types and APIs Procedure UI Script Add a UI Script as a widget dependency.Create a function in the UI Script which accepts i18n as a parameter.Then you can use the getMessage(messageKey, callback) method from i18n to internationalise any strings that are defined in the sys_ui_message table. Example: function translateAlert(i18n) { text = 'Request Cancelled'; // message key i18n.getMessage('Request Cancelled', function(response) { alert(response); // translated string }); } Client Script (Widget) In the Client Script section of the widget, add i18n as a service.Then call the function defined in the UI Script and pass the i18n service to it. Example: function(i18n) { // added i18n as a service /* widget controller */ var c = this; translateAlert(i18n); // passing i18n service to the function in UI Script } Applicable Versions Helsinki and above Additional Information Please note, that i18n.getMessage(messageKey, callback) is an asynchronous function, so something like the following example will not work: function translateAlert(i18n) { text = 'Request Cancelled'; translatedText = ''; // will store the response i18n.getMessage('Request Cancelled', function(response) { translatedText = response; // try to store the response }); console.log(translatedText); // will print an empty string, expected the translated string } In order to understand why this happens and how to get around this, please refer to the following links: [StackOverflow] How do I return the response from an asynchronous call?[StackOverflow] How to return value from an asynchronous callback function? [duplicate][MDN web docs] Callback function