Posted: 19 Feb 2020 10:17 EST Last activity: 20 Mar 2020 7:42 EDT
Is there a way get localized text in a specific language?
I have a requirement where in my service activity I want to return the localized value of pyStatusWork property of a case in Dutch language. I have the translation in place but if I use the function @Utilities.getLocalizedText("Resolved-Cancelled", "pyStatusWork", tools) it returns me value Resolved-Cancelled which is in ruleset XYZ and not value Verzoek ingetrokken which is in ruleset XYZ_nl. I know that this happens because my service requestor does not have XYZ_nl in it's ruleset stack. My question is there any OOTB way to get localized value in a specific language by passing a parameter like locale/language?
Or is there a way to look for java code behind function getLocalizedTextForString which is used by above mentioned rule utility function?
In the same service activity we now have requirements to return localized/display values for many more fields. What I have in my mind is to maintain a data table with actaual value & display values but which is not very efficient as it is redundant information and also involves lot of maintainence as to add every new field value in this table and also update it every time localized value changes.
I believe there must be a way to handle this using some OOTB function to utilize the existing language packs for returning localized values. Can someone who knows a way help with this?