Show Knowledge article results as per logged in user preferred language.

si21
Tera Guru

Hi experts,

Currently in Virtual agent, when user search for anything, contextual search just looks for that keyword and displays articles of all languages. Screenshot below shows results with both German and English articles.

We have a requirement to display the articles based on logged in user's preferred language.

Please guide us how can we achieve this.

24july.jpg

Thanks in advance.

 

3 REPLIES 3

Community Alums
Not applicable

Hi @si21 ,

To get articles based on the language selected by the user, we need to add the following line of code in the search source - Knowledge Bases to get the user language.

 

kb.addQuery('language',gs.getSession().getLanguage());

 

Hi Sandeep, could you please help me which search source you are referring to.

Community Alums
Not applicable