What is the way to use localized labels from Custom Labels or from field config inside lightning components?
In VF it was possible like:
$ObjectType[sObjectName].fields[fieldName].Type
$Labels.Custom_Label
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityWhat is the way to use localized labels from Custom Labels or from field config inside lightning components?
In VF it was possible like:
$ObjectType[sObjectName].fields[fieldName].Type
$Labels.Custom_Label
This feature has now been added as of Summer '15
In Lightning Components, these are called global value providers. Currently there are only a few, including $Locale, and $Browser.
Some of the very useful global variables that exist in Visualforce such as the two you state and others like $User, $Profile, and others have not yet been implemented in Lightning Component Framework.
I have the same requirement, what I did mayn't be the optimum solution; but it does suffice my requirement.
I had created a CustomLabel csv file and uploaded as a Static Resource.
Hope this will help you too.