The CreatorCon Call for Content is officially open! Get started here.

Self service portal: Add language option on login page

lomouhamadou
Kilo Guru

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

1 ACCEPTED SOLUTION

brett_karl
ServiceNow Employee
ServiceNow Employee

I completed a widget solution that ties into the Service Portal Header.



  1. Import the widget record that is attached to this reply
  2. Navigate to your header
  3. 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:


Screen Shot 2016-08-19 at 2.50.27 PM.png


Please let me know if you any more help!


View solution in original post

44 REPLIES 44

Hi Brett, check out this update which adds the ability to change language on the login page (when not logged in) thanks to Mouhamadou:


Re: Self service portal: Add language option on login page


Hi Brett,



i am doing the same the language picker is visible but its removing all other Header, can you suggest how can we achieve that.



thanks


Hi Brett,



I tried with that, but it is not working for me.



1. all the other menus in the header is vanished


2. there is no drop down apperaing for selecting other language.



Thanks and Regards,


Chandrashekar BN


Hi Brett,



This code is working fine in chrome.


However its not working on IE browser.



Could you please suggest ?


Hi,

I tried this solution but it did not work. I share a picture. As you can see in the picture ; options are not available when you click on language.find_real_file.png