Show Knowledge article results as per logged in user preferred language.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2023 02:50 AM
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.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2023 05:15 AM
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());
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2023 05:24 AM
Hi Sandeep, could you please help me which search source you are referring to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2023 05:29 AM
Hi @si21 ,
Please follow this doc :https://docs.servicenow.com/bundle/tokyo-servicenow-platform/page/build/service-portal/task/add-tabl...