I have a picklist field on a custom object who's values are translated using translation workbench. In my class I am using wrapper class and displaying the picklist value on a visualforce page using "output:text component".But the translated valu is not getting rendered as I have used a wrapper class.Can any one help to find a way around for this issue.

  • Why don't you just display the picklist? – Dominic Nov 26 '14 at 12:58

You can use a SOQL function toLabel() to get translated picklist values when you query the data:

SELECT toLabel(your_field__c) FROM YourObject__c 

See also http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select_tolabel.htm

  • Thanks Guy the solution did worked. Now when i am converting the picklist to checkboxes and display it on VF page it does not render the translated values insted the english values are displayed.In the query I have used toLabel. Any clues on this? – Gaurav Nov 27 '14 at 11:20
  • That really depends on what the VF code looks like.. Can you post it (maybe in a new question which you reference here) – Guy Clairbois Nov 27 '14 at 12:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.