As the only way to translate a Community email is using Visualforce I am trying to build a VF Component. It will take the {!Receiving_User.Id} and pass it to a controller and basically return the username and firstname of the User. These should just be rendered on the VF Component. like this

Has anyone done something similar in a controller as I am struggling to be able to get the output from it.

'{!$Label.Hi}' '{!$Label.Your_New_Username}'

  • Your question is not clear and please clarify the issue which you are facing. Did you see this question.
    – Raul
    Commented Apr 10, 2017 at 14:24
  • I want to create a VF Email template for new community user as I need it translated. the substitution fields dont support username and first name so I need a VF component which will query them and render in the page.
    – SLM3573
    Commented Apr 10, 2017 at 14:58

1 Answer 1


You cannot translate custom labels in the way you want to do it. It will only translate the custom label to the current users language settings.

You will need to use Custom settings to translate the values. You can query them by setting the name of the Custom setting to the language.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .