In apex you can reference a custom label with system.Label.labelName
, but is there a more dynamic way to get a custom label for example system.Label.get(labelName)
? I can't find anything like this in the documentation but was hoping it was possible.
I'm trying to have custom labels for fields to support multiple languages. The list of fields I'm showing is built in the controller and displayed inside an apex:repeat
tag so I can't hardcode the labels. Is there a way to accomplish this?
Thanks!