This library provides internationalization and localization. This includes message formatting and replacement, date and number formatting and parsing, and utilities for working with Bidirectional text.

This is part of the intl package.

For things that require locale or other data, there are multiple different ways of making that data available, which may require importing different libraries. See the class comments for more details.

There is also a simple example application that can be found in the example/basic directory.

Classes

Bidi

This provides utility methods for working with bidirectional text. All of the methods are static, and are organized into a class primarily to group them together for documentation and discoverability.

BidiFormatter

Bidi stands for Bi-directional text. According to Wikipedia: Bi-directional text is text containing text in both text directionalities, both right-to-left (RTL) and left-to-right (LTR). It generally involves text containing different types of alphabets, but may also refer to boustrophedon, which is changing text directionality in each row.

DateFormat

DateFormat is for formatting and parsing dates in a locale-sensitive manner. It allows the user to choose from a set of standard date time formats as well as specify a customized pattern under certain locales. Date elements that vary across locales include month name, week name, field order, etc. We also allow the user to use any customized pattern to parse or format date-time strings under certain locales. Date elements that vary across locales include month name, weekname, field, order, etc.

Intl

The Intl class provides a common entry point for internationalization related tasks. An Intl instance can be created for a particular locale and used to create a date format via anIntl.date(). Static methods on this class are also used in message formatting.

NumberFormat

Provides the ability to format a number in a locale-specific way. The format is specified as a pattern using a subset of the ICU formatting patterns.

TextDirection

Bidi stands for Bi-directional text. According to http://en.wikipedia.org/wiki/Bi-directional_text: Bi-directional text is text containing text in both text directionalities, both right-to-left (RTL) and left-to-right (LTR). It generally involves text containing different types of alphabets, but may also refer to boustrophedon, which is changing text directionality in each row.