1

How to use custom labels in apex any syntax??

I have created more than 100 custom labels on my developer sandbox and added a translation text. when I create a change-set, add the custom labels to the change-set and deploy on production, only english text is deployed but translation text are not deployed.

Please let me know is there a better method to do this?

2 Answers 2

3

When using change sets, translations are specified through Language Translation. Any translations you have set for Custom Labels, Custom Objects, Custom Fields, etc. in the Change Set will automatically be sent along for the languages you select:

enter image description here

When using a package based Metadata api deployment, the translations for Custom Labels are under translations, as opposed to custom object translations.

0
  • How to use custom labels in apex any syntax??

    Try Label.**YourLabelName**. Refer using custom labels.

  • Deploy translations

    You can do it by change set itself. Add Language Transition for doing that. When you deploy please make sure that both the language translation and the component being translated must be included in the change set. Refer deploy translations

You must log in to answer this question.

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