function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vikranthvikranth 

how to use custom label

please explain me about 

 

what is the purpose of the custom label?

how to use custom label?

can u explain me in detailed manner?

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Navatar_DbSupNavatar_DbSup

Hi,

Custom labels are custom text values that can be accessed from Apex classes or Visualforce pages. The values can be translated into any language Salesforce supports. Custom labels enable developers to create multilingual applications by automatically presenting information (for example, help text or error messages) in a user's native language.


You can create up to 5,000 custom labels for your organization, and they can be up to 1,000 characters in length.


To access custom labels, click Your Name | Setup | Create | Custom Labels. From this page, you can:


Create a new custom label or edit an existing custom label.


View an existing custom label. From the view page, you can create or edit a translation in a language used by your organization.


To add a custom label to your application, use the following steps:


Create a new custom label.
Translate the value of the label into the languages supported by your application.


Call the label using either an Apex class or a Visualforce page. Custom labels are called in Apex using

System.Label.Label_name. For Visualforce, use the $Label global variable.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

Tushar SethTushar Seth

Good Explanation of Custom Label :)

 

I have a small ques. regarding the same component....

 

How will we use Mannaged Custom Label from Unmanaged Apex Code....???

I have tried it by prefixing Namespace of managed package with Custom Label.

 

Example:

If Managed Package Name is "xYZ" and the Custom Label Name is "testCustom" then in apex cde

xYZ__testCustom.

 

Thanks in advance,

Tushar