Service Portal: Widget Client Controller Translation

Sujatha V M
Kilo Patron
Kilo Patron

Hi,

I'm facing a problem where I'm unable to translate a text/content in Client controller script of a widget (Homepage Search)

I have used ng-bind:data.greeting instead of options.title in HTML

HTML code:

find_real_file.png

For e.g. I'm trying to translate the greeting message "Welcome" but unable to get it done.

Script:

find_real_file.png

Can anyone help me on this?

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.
1 ACCEPTED SOLUTION

ChrisBurks
Mega Sage

If you have a message translation for "Welcome" then one of these ways should do it.



Option 1:


translate_options_1.png



Option 2:



translation_options_2.png



Or if you weren't using ngBind then you could also use the "${}" within the HTML template:


<h1>${Welcome} {{ user.first_name }}</h1>



The "${}"   and/or gs.getMessage() is what tells the system to do the translation.


View solution in original post

8 REPLIES 8

scott barnard1
Kilo Sage

you seem to be showing the text only



I would expect something like a getMessage 'Welcome' , that way you can translate it it



However you can also translate 'welcome' but I'd look to the message option first.


Thanks for your help Scott


Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.

ChrisBurks
Mega Sage

If you have a message translation for "Welcome" then one of these ways should do it.



Option 1:


translate_options_1.png



Option 2:



translation_options_2.png



Or if you weren't using ngBind then you could also use the "${}" within the HTML template:


<h1>${Welcome} {{ user.first_name }}</h1>



The "${}"   and/or gs.getMessage() is what tells the system to do the translation.


Thank you soo much for your help Chris



I was able to achieve it with Option 1 itself!!!


Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.