Create custom labels that can be referenced from Apex classes, Visualforce pages, or Lightning components to make an app multilingual.
- From Setup, enter Custom Labels in the Quick Find box, then select Custom Labels.
- To create a label, click New Custom Label. To edit a label, click Edit next to the custom label.
- In the Short Description text box, enter an easily recognizable term to identify this custom label. This description is used in merge fields. (NOTE you can’t change the language of an existing custom label.)
- If you’re creating a custom label: In the Name text box, enter the name the label uses. This value is used in Apex and Visualforce pages to reference the custom label. Names must contain only alphanumeric characters, start with a letter, contain no spaces or double underscores, and be unique from all other labels in your org.
- To mark the custom label as protected, check Protected Component..
- For Categories, enter text to categorize the label. This field can be used in filter criteria when creating custom label list views. Separate each category with a comma. The total number of characters allowed in the Categories text box is 255.
- In the Value text box, enter text up to 1,000 characters. This value can be translated into any language that Salesforce supports.(NOTE It can take a few minutes before all users see changes you’ve made to this field.)
- Click Save.
- Create Visual force Page and use the created CustomLable as like below
- Click Preview
This information is very helpful to experience custom label in Salesforce.
1 comment on “How to Use Custom Label in Salesforce”