(1) If you want to display the labels like error messages or warning messages in the users language then using the custom labels we can achieve it. Otherwise those will always display in English language only.
(2) Also any of the labels if you want to use it in your code, rather than hard coded them, create a Custom Label and maintain so that it will be easy to manage them.
In general definition:
Custom Labels Custom labels are custom text values that can be accessed from Apex classes, Visualforce pages, or Lightning components. 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
(1) If you want to display the labels like error messages or warning messages in the users language then using the custom labels we can achieve it. Otherwise those will always display in English language only.
(2) Also any of the labels if you want to use it in your code, rather than hard coded them, create a Custom Label and maintain so that it will be easy to manage them.
In general definition:
Custom Labels Custom labels are custom text values that can be accessed from Apex classes, Visualforce pages, or Lightning components. 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
General two use cases 1) Translations in visual force pages. You have a custom error message that you want to display to user and it needs to be translated based on user language. https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_variables_global_label.htm 2) Use some values in apex or formulas taht migth change in future and to void code changes Ex : listofprofiles that shoule be allowed. label value will be System Administrator;Read Only User Now you can use this label in apex and query for pofiles to allow certain functions. https://help.salesforce.com/HTViewHelpDoc?id=cl_about.htm
(1) If you want to display the labels like error messages or warning messages in the users language then
using the custom labels we can achieve it. Otherwise those will always display in English language only.
(2) Also any of the labels if you want to use it in your code, rather than hard coded them, create a Custom Label and maintain so that it will be easy to manage them.
In general definition:
Custom Labels
Custom labels are custom text values that can be accessed from Apex classes, Visualforce pages, or Lightning components. 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
Please look into the below links:
https://help.salesforce.com/HTViewHelpDoc?id=cl_about.htm
https://help.salesforce.com/HTViewHelpDoc?id=cl_edit.htm&language=en_US
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_variables_global_label.htm
https://developer.salesforce.com/forums/?id=906F00000008vG8IAI
Please do let me know if it helps you.
Regards,
Mahesh
All Answers
(1) If you want to display the labels like error messages or warning messages in the users language then
using the custom labels we can achieve it. Otherwise those will always display in English language only.
(2) Also any of the labels if you want to use it in your code, rather than hard coded them, create a Custom Label and maintain so that it will be easy to manage them.
In general definition:
Custom Labels
Custom labels are custom text values that can be accessed from Apex classes, Visualforce pages, or Lightning components. 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
Please look into the below links:
https://help.salesforce.com/HTViewHelpDoc?id=cl_about.htm
https://help.salesforce.com/HTViewHelpDoc?id=cl_edit.htm&language=en_US
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_variables_global_label.htm
https://developer.salesforce.com/forums/?id=906F00000008vG8IAI
Please do let me know if it helps you.
Regards,
Mahesh
1) Translations in visual force pages. You have a custom error message that you want to display to user and it needs to be translated based on user language. https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_variables_global_label.htm
2) Use some values in apex or formulas taht migth change in future and to void code changes
Ex : listofprofiles that shoule be allowed. label value will be System Administrator;Read Only User
Now you can use this label in apex and query for pofiles to allow certain functions.
https://help.salesforce.com/HTViewHelpDoc?id=cl_about.htm
Can you plz give me one example
Please find the below link for an example:
http://www.infallibletechie.com/2012/11/how-to-use-custom-labels-in-visualforce.html
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_variables_global_label.htm
Please do let me know if it helps you.
Regards,
Mahesh