- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2016 11:52 PM
Hi all,
Is it any simple way on the new Self service portal for adding the language option on the login page as we have on the backend?
thanks in advance
Regs,
Lô Mouhamadou
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2016 11:48 AM
I completed a widget solution that ties into the Service Portal Header.
- Import the widget record that is attached to this reply
- Navigate to your header
- Find the following code in the Body HTML Template:
<ul ng-if="::user.logged_in" class="nav navbar-nav">
<!-- chat, avatar, and logout -->
<li ng-if="::data.connect_support_queue_id"><a href ng-click="openPopUp()">${Live Chat}</a></li>
<li class="dropdown hidden-xs">
<a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">
<span class="navbar-avatar"><sn-avatar class="avatar-small-medium" primary="userID" /></span>
<span class="visible-lg-inline">{{::user.name}}</span>
</a>
Add the following code (to line 4):
<li><sp-widget widget="data.languagePicker"></sp-widget></li>
Navigate down to Server Script and add the following line.
data.languageSelector = $sp.getWidget("language-picker", {});
The end result will look like this:
Please let me know if you any more help!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2016 10:46 AM
I highly recommend to have a look at the offcial documentation as well as looking at the unofficial documentation. Anyway it's quite simple. You have a function setLanguage defined in the $scope object. it's called when user chooses a new language. Then the server side code is running and the newLanguage is passed as a part of input object. Whenever you call $scope.server.update() you are automatically passing the $scope.data object.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2016 03:37 PM
Thank you. I got this to work, but I have 3 languages. English, Spanish and Hebrew. It is only picking up English and Hebrew. I assume I would need to use if (lang.hasNext()) in the Language Picker at the Server script section?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2016 10:27 AM
To display more languages try to correct the HTML template in widget using these lines:
<ul class="dropdown-menu">
<li><a ng-click="setLanguage('en')">English</a></li>
<li ng-repeat="lang in data.languages"><a ng-click="setLanguage(lang.value)">{{lang.label}}</a></li>
</ul>
Or you can simply download the newer version as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2016 11:05 AM
Thank you for that. Of course I opted to get the update and it works flawlessly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2016 03:19 PM
Hi Karl,
Many thanks for the code, I tried it and it works like a charm - until I'm trying it under IE 10 or 11... With this Marvelleous Bowser we run into problems each day, but this is customer's standard.
The symptom is that clicking on a different language it has no effect under IE.
Do you have any idea about what could cause the problem?