Vue Common - Utils - localization
An object that serves as a namespace for the methods that are used to localize an application.
See Also
formatDate(value, format)
Converts a Date object to a string using the specified format.
The formatted string.
const dateString = DevExpress.localization.formatDate(new Date(2018, 4, 7), "longDate"); console.log(dateString); // logs "Monday, May 7, 2018" // ===== or when using modules ===== import { formatDate } from "devextreme/localization"; const dateString = formatDate(new Date(2018, 4, 7), "longDate"); console.log(dateString); // logs "Monday, May 7, 2018"
See Also
formatMessage(key, value)
Substitutes the provided value(s) for placeholders in a message that the key specifies.
The formatted message.
Refer to the following help topic for a code example: Add Strings to a Dictionary.
formatNumber(value, format)
Converts a numeric value to a string using the specified format.
The formatted string.
const numberString = DevExpress.localization.formatNumber(0.25, "percent"); console.log(numberString); // logs "25%" // ===== or when using modules ===== import { formatNumber } from "devextreme/localization"; const numberString = formatNumber(0.25, "percent"); console.log(numberString); // logs "25%"
See Also
loadMessages(messages)
Loads localized messages.
The messages to be loaded.
Refer to the following help topic for a code example: Add Strings to a Dictionary.
locale()
Gets the current locale identifier.
The identifier.
See Also
locale(locale)
Sets the current locale identifier.
The required locale identifier.
See Also
parseDate(text, format)
Parses a string into a Date object.
A Date object equivalent to the specified string.
Refer to the following help topic for a code example: Format Custom Values.
parseNumber(text, format)
Parses a string into a numeric value.
A numeric value equivalent to the specified string.
If you have technical questions, please create a support ticket in the DevExpress Support Center.