Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Commit 115bc52

Browse files
committed
Explained lack of Intl.Collator support
1 parent cc62753 commit 115bc52

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,23 @@ Most of those functions have comments marked as 'TODO' in the source code.
5454
<sup>*</sup> some of the tests cannot be passed from an ES5 implementation because they
5555
check for native behaviour. The majority of them should be passable, though.
5656

57+
## What about Intl.Collator?
58+
59+
Providing an `Intl.Collator` implementation is no longer a goal of this project. There
60+
are several reasons, including:
61+
62+
- The CLDR convertor does not automatically convert collation data to JSON
63+
- The Unicode Collation Algorithm is more complicated that originally anticipated,
64+
and would increase the code size of Intl.js too much.
65+
- The Default Unicode Collation Element Table is huge, even after compression, and
66+
converting to a native JavaScript object would probably make it slightly larger.
67+
Server-side JavaScript environments will soon already support Intl.Collator,
68+
and we can't really expect client environments to download this data.
69+
70+
There are some local environments where it might be useful, such as a Smart TV platform,
71+
desktop widget or something, but `String.prototype.localeCompare` is probably good enough
72+
in those platforms and the gain from an implementation just wouldn't be worth it.
73+
5774
## Compatibility
5875
Intl.js is designed to be compatible with ECMAScript 3.1 environments in order to
5976
follow the specification as closely as possible. However, some consideration is given

0 commit comments

Comments
 (0)