- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2018 04:27 AM
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:
For e.g. I'm trying to translate the greeting message "Welcome" but unable to get it done.
Script:
Can anyone help me on this?
Sujatha V.M.
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2018 05:57 AM
If you have a message translation for "Welcome" then one of these ways should do it.
Option 1:
Option 2:
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2018 04:31 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2018 06:26 AM
Thanks for your help Scott
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2018 05:57 AM
If you have a message translation for "Welcome" then one of these ways should do it.
Option 1:
Option 2:
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2018 06:26 AM
Thank you soo much for your help Chris
I was able to achieve it with Option 1 itself!!!
Sujatha V.M.