Introduction

Internationalization (i18n) allows supporting multiple languages and avoiding hard-coding literals, providing an easy way to reuse literals.

When referring to i18n in LWC, the scope is:

Getting i18n related attributes for the current user

From the module @salesforce/i18n/*there is a list of interesting values for the current user:

Untitled

An example of getting the user language would be:

import userLanguage from "@salesforce/i18n/lang"

Find the full list here:

Access Internationalization Properties - Salesforce Lightning Component Library

Using Custom labels

Salesforce Custom Labels are a standard feature allowing to create and manage custom text values that can be used in all applications.

Custom Labels provide a way to define and store text values that can be translated into different languages, making it easier to create multilingual applications.

Here are some key points about Salesforce Custom Labels: