How can i translate the widget title and description in service portal

ochiengboniface
Giga Contributor

Hallo SN,

I am setting up a service portal that is going to be multilingual. I came across this discussion(https://community.servicenow.com/thread/237668) which did help in translating words i used in the HTML code.

My question is it possible/ how do i translate the widget titles and description ?

1 ACCEPTED SOLUTION

larstange
Mega Sage

Hi Boniface



I have looked at it, at ServiceNow have not implemeted the widgets in such a way, that they translate the title.



I my case I have created my own version of most of the widgets anyway, so I can enable translation of the title by adding the following line to the server script



//Translate the title


options.title = gs.getMessage(options.title);



You might consider reporting this as a bug in HI


View solution in original post

11 REPLIES 11

larstange
Mega Sage

Hi Boniface



I have looked at it, at ServiceNow have not implemeted the widgets in such a way, that they translate the title.



I my case I have created my own version of most of the widgets anyway, so I can enable translation of the title by adding the following line to the server script



//Translate the title


options.title = gs.getMessage(options.title);



You might consider reporting this as a bug in HI


Or the other thing you can do is in your template markup place the title in between ${} which is the same as doing gs.getMessage();



ie.



...


<h1>${ {{c.options.title}} }</h1>


...



It's in the documentation for Service Portal on handling translation:


Internationalization for Service Portal


Hallo Burks,


Thanks for the info. I had already gone with the first suggestion which worked for me. But this is good to know.


Regards,


Boniface


puchu
Kilo Contributor

Can you please tell me in ui messeges, what did you use your key name?