A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://js.devexpress.com/Vue/Documentation/ApiReference/Common/utils/localization/ below:

Vue Common - Utils - localization

An object that serves as a namespace for the methods that are used to localize an application.

Converts a Date object to a string using the specified format.

Parameters:

A Date object to be converted.

The format to be used for conversion.

jQuery
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"
Angular
import { formatDate } from "devextreme/localization";

const dateString = formatDate(new Date(2018, 4, 7), "longDate");
console.log(dateString); // logs "Monday, May 7, 2018"
Vue
import { formatDate } from "devextreme/localization";

const dateString = formatDate(new Date(2018, 4, 7), "longDate");
console.log(dateString); // logs "Monday, May 7, 2018"
React
import { formatDate } from "devextreme/localization";

const dateString = formatDate(new Date(2018, 4, 7), "longDate");
console.log(dateString); // logs "Monday, May 7, 2018"
See Also

Substitutes the provided value(s) for placeholders in a message that the key specifies.

Parameters:

The key that identifies the message in a dictionary.

One or several values used to fill placeholders in the message. This parameter is optional.

Refer to the following help topic for a code example: Add Strings to a Dictionary.

Converts a numeric value to a string using the specified format.

Parameters:

A numeric value to be converted.

The format to be used for conversion.

jQuery
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%"
Angular
import { formatNumber } from "devextreme/localization";

const numberString = formatNumber(0.25, "percent");
console.log(numberString); // logs "25%"
Vue
import { formatNumber } from "devextreme/localization";

const numberString = formatNumber(0.25, "percent");
console.log(numberString); // logs "25%"
React
import { formatNumber } from "devextreme/localization";

const numberString = formatNumber(0.25, "percent");
console.log(numberString); // logs "25%"
See Also

Loads localized messages.

Parameters:

The messages to be loaded.

Refer to the following help topic for a code example: Add Strings to a Dictionary.

It is necessary to reload the page each time you load new messages.

Gets the current locale identifier.

Sets the current locale identifier.

Parameters:

The required locale identifier.

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.

See Also

Parses a string into a Date object.

Parameters:

A string value to be parsed.

The format of the string to be parsed.

A Date object equivalent to the specified string.

Refer to the following help topic for a code example: Format Custom Values.

Parses a string into a numeric value.

Parameters:

A string value to be parsed.

The format of the string to be parsed.

A numeric value equivalent to the specified string.

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!

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4