Language Translation for dependent Choices not working in catalog item in Service portal

Hardik Panchal
Mega Guru

Hello All,

I've created language translation for a dependent choice list. It works very well on my normal Case form.

But it shows default English value on a Catalog item on the Service Portal when I change my language.

Normal Case Form:

find_real_file.png

Service Portal Catalog item:

find_real_file.png

I've configured it in the Choice list as shown below: But the option "--None--" is a default option in Servicenow and that too is not getting translated in the catalog item.

find_real_file.png

 

Please help.

Thanks

7 REPLIES 7

BryanS413339635
Tera Guru

Try debugging, this should point you right to what you need to update. In the left nav, type localization and go to Enable i18n debugging. Then when you reload the portal page you should be able to see what needs updating (message, translated text, label, etc)

 

If my reply has helped in any way, kindly mark it correct/helpful. Thanks!

Hii Bryan,

Thanks for your reply.

I tried debugging and this is what I get.

My choice list fields Operating System, Version and Component are dependent on the Asset Field.

So when my Asset is empty, my other dependent choice list is also empty, but the default choice "--None--" gets properly translated.

find_real_file.png

But when I select an Asset and then see the Choice list below, It doesn't even show debugging values.

find_real_file.png

Do you think the dependency is causing the issue here? Can you help me on this.

Thanks.

Check your messages table, you should have translations there for --None-- . I suspect perhaps you don't for the selected language. Here's a screenshot of my instance for the languages we have deployed:

find_real_file.png

Hii bryan,

I do have the translation for "--None--" in my messages table.

As I said above, it is showing the translation correctly when there is no dependency.

But when I change the Asset, and depending on the Asset when I get the choices for Operating System, Version and Component , at that time the translation fails.

I'm not sure why is it happening.

The choices are coming from the below script include: where Asset is the Product.

  getVersion: function() {

        var responseArr = [];
        var product = this.getParameter("sysparm_product");
        var choiceRef = new GlideRecord("sys_choice");
        try {
            choiceRef.addQuery("dependent_value", product);
            choiceRef.addQuery("element", "u_version");
            choiceRef.orderBy("sequence");
            choiceRef.query();
            while (choiceRef.next()) {
                responseArr.push(choiceRef.getValue("value"));
            }
            return responseArr.join("@");
        } catch (error) {
            gs.warn("Error: CSManagementUtils || getVersion" + error);
        }
    },