function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
F SmoakF Smoak 

fetch translated value of picklist field using apex

I have russian values for picklist field values in my org and I would like to query these out and show it to end users as records in custom object. But I dont see anyway to query in translation workbench. ANy help would be appreciated!
AnudeepAnudeep (Salesforce Developers) 
The toLabel() should help you here. It is particularly useful for organizations that have the Translation Workbench enabled. Use toLabel() to return translations on
  • Regular, multi-select, division, or currency code picklist fields that have values returned by the relevant describe call.
  • Data category group and data category unique name fields.
  • RecordType names.

See the documentation to learn more
F SmoakF Smoak
Hi Anudeep - toLabel() reflects correct translations only for current user language. I want to display custom picklist value russian translated values as a record to end-user. The issue I am facing is that I cannot retrieve translations using query/custom apex. The only way to get translations is using exported stf file which would be a data load approach and I want to avoid it. ALso it doesnt seem reliable solution because if picklist values are added in future there would not be a dynamic approach.
Any dynamic robust approach would help me achieve this functionality!