Issues with Translation in "Faceted Search" Widget

AleOliveira
Tera Contributor

Hello community,

I am encountering some issues with the "Faceted Search" widget in ServiceNow. Specifically, only some parts of the widget are being translated correctly, and I cannot locate where the remaining translations are defined. For the "results for" text, even after altering the line of code in the HTML (which is defined in sys_ui_message), the translation does not work.

I have already tried the following:

  • Checked and modified the definition in sys_ui_message.
  • Directly edited the HTML code of the widget.
  • Reviewed other messages and translation-related settings.

Has anyone else experienced something similar or know where these translations might be configured? Are there any additional places I should check or settings I might have missed?

Thank you in advance for your help!

1 ACCEPTED SOLUTION

That means those strings are hardcoded and not translatable. (Yes, ServiceNow developers also make mistakes from time to time.) Report this to ServiceNow Technical Support and hopefully they will fix it in a future release.

View solution in original post

5 REPLIES 5

For those who have encountered the problem I just described in my previous post, here is an official response: https://support.servicenow.com/kb?id=kb_article_view&sys_kb_id=78e0ef1c1b57d150cd3b33bc1d4bcb65 

 

KB1205962 

Faceted Search Widget Fix for PRB1594577 is not effective labels are not being translated

Issue

The fix for the following known problem needs further configuration.

KB1125149 Faceted Search widget is not translating facet options to non-English language
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1125149

Release

San Diego Patch 7
Tokyo Patch 1

Cause

No further configuration to enable the fix is documented in the release notes:
https://docs.servicenow.com/en-US/bundle/tokyo-release-notes/page/release-notes/quality/tokyo-patch-...

Resolution

In order for the fix for PRB1594577 to be implemented in your Tokyo Patch 1 instance, it is also necessary to complete some configuration changes. It is necessary to make configuration changes to the HTML Template code of the "Faceted Search" widget to enable the translation of the labels and configure translation records in the sys_ui_message table.

Note: It is not best practice to modify the configuration of OOB widgets directly, instead it is recommended that you clone the OOB widget and then reconfigured the pages to use the clone widget. This is because modified OOB widgets will be skipped by future upgrades.

Here are the recommended configuration changes that need to be applied to ensure the labels will be  translated:

1. clone the OOB "Faceted Search" widget and rename it "Faceted Search Translated"

2. modify the HTML Template code of the "Faceted Search Translated" widget. In the <sn-search-facets> tag add the argument enable-label-translation="true"

 

jclavijo_0-1753353385977.png

 


3. Given the page route map defined from the "search" page for the service portal, it is necessary to reconfigure the "sp_search" service portal page to have the clone widget "Faceted Search Translated".

4. It is necessary to create new records in the sys_ui_message table to translate the English option labels  to the required non-English language text.

After completing the above reconfiguration you should then see the category labels being translated when non-English language is selected and searching in the service portal.

 

Hope this gets resolved soon. It's really weird going against the good practices from ServiceNow by recommendation from ServiceNow...