Displaying Kb articles according to the Language in Language Picker

salomesimpsone
Giga Contributor

Hi All,

In service portal, we have a widget called "Language Picker" that allows the user to switch between the Languages.

But My need is to display the KB articles according to the switched Language

For example, if user selects 'Japanese' in Language Picker, the Kb articles in Japanese Language must only be visible to the User

Can anyone help on this??

Thanks in Advance

1 ACCEPTED SOLUTION

Hi Robbie,



As of my understanding, the "Language Picker" widget in the Service portal is working as below:



i)When user selects a specific language in the "Language picker", the "Language(preferred_language)" field in "Sys_user"   table is getting updated



So,In "KB View 2" widget, I just added the below code to get 'Language' field Value



data.language = gs.getUser().getLanguage();--->(In server script)



And queried it in 'kb_knowledge' table(In 'getDocuments()')


View solution in original post

9 REPLIES 9

Robbie
Kilo Patron
Kilo Patron

Hi Salome,


Translation of the knowledge base is possible. Have you viewed the following wiki link: Translate the knowledge base


This link goes over how this is possible.



Please mark this response as correct and helpful via your post link (Displaying Kb articles according to the Language in Language Picker) to help others with the same question.



Thanks,


Robbie


Hi Robbie,



Thanks for your reply,



I have some idea on KB article translation, but my requirement is Different.



The user needs to view only the KB articles that matches with the user selected 'Language Picker' Language.


Robbie
Kilo Patron
Kilo Patron

Hi Salome,


Activating the Knowledge Management Internationalization plugin installs a few components, one of which is a business rule named knowledge query that automatically filters the knowledge portal and search results based on the user's selected language.



Can you try and leverage this.



For more info: https://docs.servicenow.com/bundle/istanbul-servicenow-platform/page/product/knowledge-management/co...



Please mark this response as correct and helpful via your post link (Displaying Kb articles according to the Language in Language Picker) to help others with the same question.



Thanks,


Robbie


ESL
ServiceNow Employee
ServiceNow Employee

Hello Robbie

Can you explain the detail to use the business rule "knowledge Query" to display the language KB based on the user prefer language setting?

The have activated the OOTB business rules but all KB articles show on the Service portal.

 

Please advice. Thanks