2

We are in the process of implementing a set of complex Visualforce pages, with Controller Extensions in a Multi-language environment (that uses the Translation Workbench). One of the items we are trying to address is how to leverage the value of a translated picklist to control conditional rendering. Is there a "best practice" for this?

For example:

public Boolean showAxleTab(){
   boolean b=false;
   if(myrec.complist.contains('Axle')){
      b=true;
   }
   return b;
}

The challenge is that the complist picklist might be translated, and the value of Axle may be different. How have other people handled this issue? Thanks in advance

4
  • I thought that the value of the picklist is always the same and only title could be translated? May 28, 2014 at 12:58
  • The picklist values themselves can be translated as well.
    – JimRae
    May 28, 2014 at 13:23
  • 1
    Not sure. With Translation workbench you can only translate picklist value label (title) and not a value itself: The enumerated field values are fixed and do not change with a user’s language. However, each value may have a specified “label” field that provides the localized label for that value. (from here) May 28, 2014 at 13:58
  • Interesting, maybe I am overthinking it. I will do some more testing.
    – JimRae
    May 28, 2014 at 14:13

1 Answer 1

1

@mast0r was right, the label translates, not the value.

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.