Knowledge articles does not honor the language user preference in portal.


Description

When the user searches for an article in the kb_view page in the portal, it returns all the articles irrespective of the language selected by the user.

Release or Environment

All

Resolution

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());