About this Directory

The globalization namespace is intended for the development of the ECMAScript Internationalization API (formerly known as ECMAScript Globalization API). This API provides customizable language-sensitive functionality as an add-on to the ECMAScript Language Specification.

Edition 1.0 of standard ECMA-402, ECMAScript Internationalization API Specification, is available on the Ecma International web site: PDF, HTML, EPUB.

Main pages:

Internationalization issues in the ECMAScript Language Specification itself will continue to be discussed in the strawman and harmony namespaces.

Goals

Provide an API that complements the ECMAScript Language Specification with:

  • Consistent, rich internationalization API, similar to what modern operating systems and internationalization libraries have today for C++ and Java.
  • Consistent results (not 100% identical but comparable to the data collected in CLDR or the locale support on major platforms).
  • Support for multiple locales per application.
  • Identification of locales, time zones, currencies etc. using existing standards.
  • Reuse of objects that are more expensive to create, like collators.

Background

The ECMAScript Language Specification provides limited support for internationalization. The current API offers rudimentary sorting and formatting functions like Date.toLocaleString(). The API is tied to a single locale determined by the host environment.

Developers came up with two ways of solving some of these problems:

  • Implement dedicated internationalization libraries for formatting dates and currencies and bundle them with data for the locale selected by the application.
  • Do all internationalization processing on the server and send down the results.

Both of these approaches have problems:

  • Server side processing introduces latency and requires on-line access and a server that would do internationalization work. For instance, browser extensions or browser UIs written in ECMAScript do not have any server to talk to.
  • Dedicated libraries have various limitations, like size of the library and inconsistent API. The biggest problem is the size and complexity of data needed for collation, which means that clients have to either use preprocessed data for sorting or use the server to sort data. Moreover, multiple browser extensions may end up installing multiple copies of an internationalization library or multiple internationalization libraries with mostly overlapping data/APIs.

Related Information

 
globalization/globalization.txt · Last modified: 2012/12/21 05:37 by norbert
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki