- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2021 07:37 AM
Can someone please give me advice on how to implement a language filter on the backend in order to show only those Knowledge articles to end user that are in his set language?
I mean if the user's language set in his profile in the backend is English, only English KB articles will be shown to him on Service Portal.
As mentioned, this needs to be implemented in the backend.
Thank you.
Solved! Go to Solution.
- Labels:
-
Multiple Versions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 05:29 AM
So the second picture is similar to the ootb "Create Incident" Record Producer,
I've just tried it on one of my instances and what I'm about to propose works for this specific search use-case as it's only filtering against the search from the Record Producer and in theory nothing else, however further testing would be required to make sure it doesn't restrict other places just to be 100% safe,
Searching before anything changed (shows all results):
Find the "Search Context" for your Record Producer, my example looks like this:
Go into the related list of "Record Producer Configurations" specifically into the record of your RP (mine is "Create Incident", so I'd imagine yours based on your screenshot is "Report an Issue"):
* You won't have a filter configuration listed necessarily, you'll need to create one like the following:
* As you create the new record, the script won't be editable so just "save" then add the line I have highlighted
Test your search on the Record Producer and it should work, example with an English user:
example with a French user (as I have a French Article related to the English source):
Many thanks,
Kind regards
Director of Globalization Deployment, Internationalization
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 03:19 AM
This widget is also property driven, which allows either one language to be selected at a time, or multiples as you can see in the image above. The property should be "glide.knowman.enable_multi_language_search",
Top tip, this widget is also super handy for integrating into other portals, details on how can be found here
Many thanks,
kind regards
Director of Globalization Deployment, Internationalization
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 04:23 AM
Hi
Thank you for your suggestion. I feel I did not provide the full explanation of what I need to have done. I use the contextual search in a field under my incident form on frontend, where, if you type in the 'short description of your issue' field, knowledge base articles that include the given typed word appear in the 'search results' below.
So it is here, where I need to have the given articles already filtered according to the preferred language of the end user.
I have tried to set the 'Search Resource Context Property' condition's value as:
kb_knowledge_base=58aa42a7db61b3005c437ecaae96198b^languageSAMEASjavascript:gs.getSession().getLanguage()
or
'kb_knowledge_base=58aa42a7db61b3005c437ecaae96198b^language='+gs.getSession().getLanguage()
But none of them worked...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 05:29 AM
So the second picture is similar to the ootb "Create Incident" Record Producer,
I've just tried it on one of my instances and what I'm about to propose works for this specific search use-case as it's only filtering against the search from the Record Producer and in theory nothing else, however further testing would be required to make sure it doesn't restrict other places just to be 100% safe,
Searching before anything changed (shows all results):
Find the "Search Context" for your Record Producer, my example looks like this:
Go into the related list of "Record Producer Configurations" specifically into the record of your RP (mine is "Create Incident", so I'd imagine yours based on your screenshot is "Report an Issue"):
* You won't have a filter configuration listed necessarily, you'll need to create one like the following:
* As you create the new record, the script won't be editable so just "save" then add the line I have highlighted
Test your search on the Record Producer and it should work, example with an English user:
example with a French user (as I have a French Article related to the English source):
Many thanks,
Kind regards
Director of Globalization Deployment, Internationalization
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 05:48 AM
Thank you so much,
In the meantime I realized, even maybe my condition filter worked correctly, but there is a problem in the settings of some of the articles, e.g. there is an article written in German, but it's set as an article in English 😮
And the listed articles (thanks to this wrong setting) still listed all articles that were written in both languages.
Thank you so so much for your help, highly appreciated! All the best,
Lili