How to access multiple line custom label and static resource file uses of “@salesforce/label/” and “@salesforce/resourceUrl/” property in Lightning Web Component Salesforce Lwc #71
Import labels from the @salesforce/label scoped module. Custom labels are text values stored in Salesforce that can be translated into any language that Salesforce supports. Use custom labels to create multilingual applications that present information (for example, help text or error messages) in a user’s native language.
Do you know:- The Best {label.X5g_Mobiles} Android Phones are best supreme performance, connectivity features, camera display quality and long-lasting battery, Check Here..
Step 2:- Create Lightning Web Component : lwcCustomLabel.js
` import { LightningElement } from 'lwc';
import w3webLogo from '@salesforce/resourceUrl/w3webLogo';
import w3webTutorial from '@salesforce/label/c.w3web_Salesforce_Tutorial';
import salesforce_tutorial from '@salesforce/label/c.salesforce_tutorial';
import X5g_Mobiles from '@salesforce/label/c.X5g_Mobiles';
import online_shopping from '@salesforce/label/c.online_shopping';
export default class LwcCustomLabel extends LightningElement {
In this post we are going to learn about How to access multiple line custom label and static resource file uses of “@salesforce/label/” and “@salesforce/resourceUrl/” property in Lightning Web Component Salesforce Lwc.
Import labels from the @salesforce/label scoped module. Custom labels are text values stored in Salesforce that can be translated into any language that Salesforce supports. Use custom labels to create multilingual applications that present information (for example, help text or error messages) in a user’s native language.
→ Get source code live demo link:-
Step 1:- Create Lightning Web Component : lwcCustomLabel.html
`
{label.w3webTutorial}
Custom Labels Apply into Middle of Sentence
Custom Labels Names
`
Step 2:- Create Lightning Web Component : lwcCustomLabel.js
` import { LightningElement } from 'lwc';
import w3webLogo from '@salesforce/resourceUrl/w3webLogo';
import w3webTutorial from '@salesforce/label/c.w3web_Salesforce_Tutorial'; import salesforce_tutorial from '@salesforce/label/c.salesforce_tutorial'; import X5g_Mobiles from '@salesforce/label/c.X5g_Mobiles'; import online_shopping from '@salesforce/label/c.online_shopping'; export default class LwcCustomLabel extends LightningElement {
}`
Step 3:- Create Lightning Web Component : lwcCustomLabel.js-meta.xml
` <?xml version="1.0" encoding="UTF-8"?>