1 |
|
2 |
|
3 |
|
4 |
|
5 | (function (global, factory) {
|
6 | if (typeof define === 'function' && define.amd) {
|
7 | define(['../numeral'], factory);
|
8 | } else if (typeof module === 'object' && module.exports) {
|
9 | factory(require('../numeral'));
|
10 | } else {
|
11 | factory(global.numeral);
|
12 | }
|
13 | }(this, function (numeral) {
|
14 | var suffixes = {
|
15 | 1: '\'inci',
|
16 | 5: '\'inci',
|
17 | 8: '\'inci',
|
18 | 70: '\'inci',
|
19 | 80: '\'inci',
|
20 |
|
21 | 2: '\'nci',
|
22 | 7: '\'nci',
|
23 | 20: '\'nci',
|
24 | 50: '\'nci',
|
25 |
|
26 | 3: '\'üncü',
|
27 | 4: '\'üncü',
|
28 | 100: '\'üncü',
|
29 |
|
30 | 6: '\'ncı',
|
31 |
|
32 | 9: '\'uncu',
|
33 | 10: '\'uncu',
|
34 | 30: '\'uncu',
|
35 |
|
36 | 60: '\'ıncı',
|
37 | 90: '\'ıncı'
|
38 | };
|
39 |
|
40 | numeral.register('locale', 'tr', {
|
41 | delimiters: {
|
42 | thousands: '.',
|
43 | decimal: ','
|
44 | },
|
45 | abbreviations: {
|
46 | thousand: 'bin',
|
47 | million: 'milyon',
|
48 | billion: 'milyar',
|
49 | trillion: 'trilyon'
|
50 | },
|
51 | ordinal: function (number) {
|
52 | if (number === 0) {
|
53 | return '\'ıncı';
|
54 | }
|
55 |
|
56 | var a = number % 10,
|
57 | b = number % 100 - a,
|
58 | c = number >= 100 ? 100 : null;
|
59 |
|
60 | return suffixes[a] || suffixes[b] || suffixes[c];
|
61 | },
|
62 | currency: {
|
63 | symbol: '\u20BA'
|
64 | }
|
65 | });
|
66 | }));
|