1
+ # Intl.js [ ![ Build Status] [ ]] ( https://travis-ci.org/andyearnshaw/Intl.js )
2
+
1
3
In December 2012, ECMA International published the first edition of Standard ECMA-402,
2
4
better known as the _ ECMAScript Internationalization API_ . This specification provides
3
5
the framework to bring long overdue localisation methods to ECMAScript implementations.
@@ -10,7 +12,10 @@ current Firefox nightly builds.
10
12
described by the specification, so that developers can take advantage of the native API
11
13
in environments that support it, or ` Intl.js ` for legacy or unsupporting environments.
12
14
13
- ## <a id =start ></a >Getting started
15
+ [ Build Status ] : https://travis-ci.org/andyearnshaw/Intl.js.png?branch=master
16
+
17
+
18
+ ## Getting started
14
19
For Node.js applications, you can install Intl.js using NPM:
15
20
16
21
npm install intl
@@ -29,12 +34,8 @@ var nf = new (Intl || IntlPolyfill).NumberFormat(undefined, {style:'currency', c
29
34
document .getElementById (' price' ).textContent = nf .format (100 );
30
35
```
31
36
32
- ## <a id =status ></a >Status
33
- The latest test, run on January 10 2013, scored 111 out of 111<sup >\* </sup > in Node.js.
34
-
35
- Aside from 1 issue with floating point precision in Firefox/SpiderMonkey, ` NumberFormat `
36
- seems to be rather complete.
37
37
38
+ ## Status
38
39
Current progress is as follows:
39
40
40
41
### Implemented
@@ -66,13 +67,14 @@ Current progress is as follows:
66
67
A few of the implemented functions may currently be non-conforming and/or incomplete.
67
68
Most of those functions have comments marked as 'TODO' in the source code.
68
69
69
- < sup > \* </ sup > The test suite is run with Intl.Collator tests removed, and the Collator
70
- constructor removed from most other tests in the suite. Also some parts of tests that
71
- cannot be passed by a JavaScript implementation have been disabled, as well as a small
72
- part of the same tests that fail due to [ this bug in v8] [ ] .
70
+ The test suite is run with Intl.Collator tests removed, and the Collator
71
+ constructor removed from most other tests in the suite. Also some parts of
72
+ tests that cannot be passed by a JavaScript implementation have been disabled,
73
+ as well as a small part of the same tests that fail due to [ this bug in v8] [ ] .
73
74
74
75
[ this bug in v8 ] : https://code.google.com/p/v8/issues/detail?id=2694
75
76
77
+
76
78
## What about Intl.Collator?
77
79
78
80
Providing an ` Intl.Collator ` implementation is no longer a goal of this project. There
@@ -86,12 +88,17 @@ are several reasons, including:
86
88
Server-side JavaScript environments will (hopefully) soon support Intl.Collator,
87
89
and we can't really expect client environments to download this data.
88
90
91
+
89
92
## Compatibility
90
93
Intl.js is designed to be compatible with ECMAScript 3.1 environments in order to
91
94
follow the specification as closely as possible. However, some consideration is given
92
95
to legacy (ES3) environments, and the goal of this project is to at least provide a
93
96
working, albeit non-compliant implementation where ES5 methods are unavailable.
94
97
98
+ A subset of the tests in the test suite are run in IE 8. Tests that are not passable
99
+ are skipped, but these tests are mostly about ensuring built-in function behaviour.
100
+
101
+
95
102
## Locale Data
96
103
` Intl.js ` uses the Unicode CLDR locale data, as recommended by the specification.
97
104
The data is available in JSON format, or JSONP format in the [ locale-data] ( https://github.com/andyearnshaw/Intl.js/tree/master/locale-data )
0 commit comments