@salesforce/i18n
v0.0.21
Published
@salesforce/i18n reference implementation
Downloads
828
Maintainers
Keywords
Readme
@salesforce/i18n scoped module
Reference implementation of @salesforce/i18n modules for all locales. A custom module loader is required to provision the appropriate locale-specific module.
Static modules are generated for all locales and available in dist/
. Locales available on Salesforce Platform are exposed using lwc.config.json.
Typescript Interface
Refer to the dist/types/index.d.ts
for Typescript interfaces for all @salesforce/i18n modules.
Module Naming
It is expected that consumers reference @salesforce/i18n modules in a locale-agnostic manner and rely on the module loader to provision the locale-appropriate implementation.
Locales available on Salesforce Platform are exposed using lwc.config.json with the naming scheme @salesforce/i18n/{module name}/{locale}
.
For example, @salesforce/i18n/dir
for locale es-SV
is exposed as @salesforce/i18n/dir/es-SV
.
A module loader may use this mapping to provision the locale-appropriate implementation.