Ecma International has published a new API specification that makes it easier for developers working with ECMAScript and its variants — JavaScript, Jscript, and others — to internationalize applications written in those scripting languages. Ecma International approved the new standard, ECMA-402 ECMAScript Internationalization API Specification, at its December 2012 General Assembly.

ECMA-402 provides support that enables JavaScript and other EMCAScript applications to handle the following tasks in an application, thus giving an app the flexibility to choose which national language to use and tailor functionality accordingly.

  • string comparison for sorting (such as for Swedish, where “ö” is a separate letter that sorts after “z”),
  • number and currency formatting (such as “1.234,56 €” for a German language € presentation, or the following choices for a Serbian language USD presentation: 12.345,12 US$, 12.345,12 USD or 12.345,12 америчких долара),
  • date- and time-formatting capabilities (such as 2012年12月12 for a Japanese-language date, or for a French date: mercredi 12 décembre 2012).

You can download the ECMA-402 ECMAScript Internationalization API Specification here.