Get localized choice list value

Hello everybody,

I am trying to find a way to get the localized value from a choice list in a script. For example, if I am creating an e-mail notification I would like to start it with something like:

Dear ${assigned_to.introduction} ${assigned_to},

where the output would be:

Dear Mr John Doe, ...

Now, if I want to send another notification in French, I would start with something like:

Cher ${assigned_to.introduction} ${assigned_to},

where the output would be:

Cher Monsieur Jean Dupont, ...

Unfortunately, the ${assigned_to.introduction} variable will always return the English values of the choice list ("Mr", "Mrs" and so on). Is there a way to get the localized values that are existing in the system (in "sys_choice" table)?

Many thanks in advance for your help!
Best Regards,

Alain


Hello Guy,

Thank you for your answer.
However, I do not really understand how the variables could return the appropriate language value, typically when they are used in an email notification. I mean, how could the system know which language do you want the choice value to be set to?

Kind Regards,

Alain


Hi Alain,

I spoke with the developer who works on localization, and she said that variables should return the appropriate language value. She said that if it is always returning the English value, you should open an incident ticket, because that is not expected behavior.

Yours,

Guy Yedwab
Documentation

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.