tr-TR.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*!
  2. * numbro.js language configuration
  3. * language : Turkish
  4. * locale : Turkey
  5. * author : Ecmel Ercan : https://github.com/ecmel,
  6. * Erhan Gundogan : https://github.com/erhangundogan,
  7. * Burak Yiğit Kaya: https://github.com/BYK
  8. */
  9. (function() {
  10. 'use strict';
  11. var suffixes = {
  12. 1: '\'inci',
  13. 5: '\'inci',
  14. 8: '\'inci',
  15. 70: '\'inci',
  16. 80: '\'inci',
  17. 2: '\'nci',
  18. 7: '\'nci',
  19. 20: '\'nci',
  20. 50: '\'nci',
  21. 3: '\'üncü',
  22. 4: '\'üncü',
  23. 100: '\'üncü',
  24. 6: '\'ncı',
  25. 9: '\'uncu',
  26. 10: '\'uncu',
  27. 30: '\'uncu',
  28. 60: '\'ıncı',
  29. 90: '\'ıncı'
  30. },
  31. language = {
  32. langLocaleCode: 'tr-TR',
  33. cultureCode: 'tr-TR',
  34. delimiters: {
  35. thousands: '.',
  36. decimal: ','
  37. },
  38. abbreviations: {
  39. thousand: 'bin',
  40. million: 'milyon',
  41. billion: 'milyar',
  42. trillion: 'trilyon'
  43. },
  44. ordinal: function(number) {
  45. if (number === 0) { // special case for zero
  46. return '\'ıncı';
  47. }
  48. var a = number % 10,
  49. b = number % 100 - a,
  50. c = number >= 100 ? 100 : null;
  51. return suffixes[a] || suffixes[b] || suffixes[c];
  52. },
  53. currency: {
  54. symbol: '\u20BA',
  55. position: 'postfix'
  56. },
  57. defaults: {
  58. currencyFormat: ',4 a'
  59. },
  60. formats: {
  61. fourDigits: '4 a',
  62. fullWithTwoDecimals: ',0.00 $',
  63. fullWithTwoDecimalsNoCurrency: ',0.00',
  64. fullWithNoDecimals: ',0 $'
  65. }
  66. };
  67. // CommonJS
  68. if (typeof module !== 'undefined' && module.exports) {
  69. module.exports = language;
  70. }
  71. // Browser
  72. if (typeof window !== 'undefined' && window.numbro && window.numbro.culture) {
  73. window.numbro.culture(language.cultureCode, language);
  74. }
  75. }.call(typeof window === 'undefined' ? this : window));