Vue Common - utils - localization
An object that serves as a namespace for the methods that are used to localize an application.
loadMessages()
Loads DevExtreme messages.
import { loadMessages } from "devextreme/localization"
Parameters:
messages:
The messages to be loaded.
The object passed to this method should have the following structure. The first level keys are locale identifiers, which hold an object consisting of key-value pairs.
JavaScript
{ "en": { "Yes": "Yes", "No": "No", . . . }, "es": { "Yes": "Si", "No": "No", . . . } }
NOTE
This method should be called only once - at the application's launch. It is necessary to reload the page each time you need to load new messages.
locale()
Gets the current locale identifier.
import { locale } from "devextreme/localization"
Return Value:
The identifier.
locale(locale)
Sets the current locale identifier.
import { locale } from "devextreme/localization"
Parameters:
locale:
The required locale identifier.
NOTE
This method should be called only once - at the application's launch. It is necessary to reload the page each time you need to set new locale.
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.