1 |
|
2 |
|
3 | if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
|
4 | Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["one","two","few","other"]},"fn":function(n, ord) {
|
5 | var s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);
|
6 | if (ord) return n10 == 1 && n100 != 11 ? 'one'
|
7 | : n10 == 2 && n100 != 12 ? 'two'
|
8 | : n10 == 3 && n100 != 13 ? 'few'
|
9 | : 'other';
|
10 | return n == 1 && v0 ? 'one' : 'other';
|
11 | }},"locale":"en"})
|
12 | }
|