Language Packs
Last updated
Last updated
With EJS language packs, you can localize your module one at a time. At runtime, the appropriate language packs are resolved, loaded, cached, and applied for the active locale and active .
Each language pack supports metadata in addition to the definitions.
Each language pack file must be named with the corresponding (e.g. en-US.js
).
Language packs are loaded from a 's Asset/languages
directory.
Before the application can load a 's language pack, it must know which are supported by the module. This is accomplished by updating the module's .
Each language pack may only reference its own string resources at this time.
First, define the string resource in the language pack file.
Next, inside a component definition, use the v-i18n
directive and a reference to the string resource identifier (welcome_message
), passing in a value to the firstName
and lastName
variables.
Finally, the rendered result is:
The is supported by default in all language packs.