For unauthenticated users, choices are not appearing in non-English Language

vivek_chudasama
Tera Contributor

For unauthenticated users, choices are not appearing in non-English Language,

For the portal, category variable is Dependent on 'Type of Request' and there are 'sys_choice' records available for the non-English language as well.

vivek_chudasama_0-1717782850167.png

 

I have tried adding the condition in the reference qualifier in Category variable below : 

'^language=' + gs.getUser().getLanguage(); 

Refer the screenshot below of Reference qualifier condition: 

vivek_chudasama_1-1717783043875.jpeg

The issue is occuring for non-logged in users only, for logged in users - the choices appearing correctly on the same catalog item category. 

 

Can anyone suggest how to fix this issue and show non-English choices for unauthenticated guest users, thanks in advance!

 

Regards,

Vivek Chudasama

 

4 REPLIES 4

Maik Skoddow
Tera Patron
Tera Patron
gs.getUser().getLanguage()

cannot work as this is for logged-in users only. For non-loggedin users ServiceNow always impersonates with the "guest" user and its language is always the same (the one which have been configured in its profile).

 

Instead please try with:

gs.getSession().getLanguage()

 

Hello Maik, 

Thank you for your reply! 

I have tried the solution of using gs.getSession().getLanguage() as you suggested on reference qualifier condition as below. 

vivek_chudasama_0-1718028554969.png

Unfortunately, this didn't make choices available on non-English language on portal for the unauthenticated users. They are still able to see the choices in English language. Refer below. 

vivek_chudasama_1-1718028662715.png

I have checked the permission part of the catalog item variable, which has public access given to all the places. 

vivek_chudasama_2-1718028766340.png

Choices records appaer correctly for logged in users, sharing below choices records grouped by language. 

vivek_chudasama_3-1718028887602.png

Since "guest" user changed the language through language picker, session's language should be non-English language selected by user, as you have suggested. 

I would greatly appreciate any assistance you can provide on this matter. Thank you very much in advance!

 

Regards,

Vivek Chudasama

 

vivek_chudasama
Tera Contributor

Hello @Maik Skoddow ,  Tagging you for better reach, thanks!

 

Regards,

Vivek Chudasama

 

 

Without any detailed insights into your implementation, it is difficult to answer. Therefore, please check the following article which sheds some light on the overall topic: https://www.servicenow.com/community/international-localization/need-to-add-a-language-selector-for-...