The CreatorCon Call for Content is officially open! Get started here.

Record producer select box show different values based on user language.

Jim Calhoun
Kilo Contributor

I have a standard record producer built many years ago just in English.  I need it to work in French but some of the fields are custom and the select box values are in English.  I have had them translated to French, but I am not sure how to have them added and how to get them to be available for the French users.  I have enabled the French plugin.  I was thinking of created a new record producer for the French user and direct them to it upon login.  Not sure what is the best practice is here.

 

thanks - Jim

1 ACCEPTED SOLUTION

-O-
Kilo Patron

Well, then the question is: do you want to have all options in French too, or do you want to have 32 options for users choosing English as their UI language and 2 options for those choosing French.

If you want to have the same amount of choices in both languages, you should just define all remaining values with French labels too. As you start defining those French labels for existing not-yet-translated values, you should see that the English counterpart will disappear from the list. E.g. if you add the French translation for Drum, the English choice should no longer show up when switching to French. A.s.o.

View solution in original post

28 REPLIES 28

Well, it seems I was wrong, the variable has type Select Box and you are probably manually synchronizing values between the Problem type field on Incident and the Variable. That must mean that the options are held in Question Choice [question_choice]. That table has a different method of translating stuff. The data type of field "Text" that holds the labels of choice is translated_field. Those kind of fields are translated by adding/maintaining records in translation table sys_translated. This can be cumbersome to maintain.

Another more easily maintainable option might be to change the type of variable to Lookup Select Box that will have as source table Choice [sys_choice] and apply a reference qualifier that limits the choices to the language of the current user.

Forgot to add the link to a relevant doc. page: Translation tables.

@Jim Calhoun  In the Application Navigator, enter "sys_choice.list". This will bring up a choices list. Filter by "Table" name and "Element" = field name. Then sort by "Value" column. This will list all choices that will be displayed in the select box.

There should be 2 entries for each Value. One for English (language=en) and one for French (language=fr). "Label" column show what will be displayed in the Select box. So for language=fr, the Label should have French translation.

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Jim

I think there's a bug in ServiceNow.

Tested as follows. I've made a record producer with a select box.

Choices in Record Producer is saved in question_choice table.

If I enable I18N ("System Localization" > "Enable I18N Debugging"). I see that translations in Record Producer is made in sys_translated table ("System Localization" > "Translated Name/Fields").

find_real_file.png

So I add a translation for the choices.

find_real_file.png

If I open the variable definition in the Record Producer, I see the question and choices are translated properly as below.

find_real_file.png

However, if I view it in Service Portal, the choices aren't translated.

find_real_file.png

I believe the situation described by @Jim Calhoun is different, the solution relies on "importing" choices from the field on Incident - have a look at the variable definition attached.

Anyway, did the same in Quebec - works as expected. Have created a field on Incident, called Problem type of type String. Have defined two choices for the field:

find_real_file.png

Have added a new variable to the OOB Create Incident record producer, Select Box, Choice table = incident Choice field = Problem type:

find_real_file.png

If I switch to French, both in CMS and in Portal, the proper choices are shown:

find_real_file.png

and

find_real_file.png

Needless to say, when I switch to English everything goes back to English. And at no time do I have both English and French choices in the drop-downs.

What is the SN version you have experimented with? How about the SN version of your instance @Jim Calhoun?

It could be either a bug in a different version, or the list of choices is not properly defined.