es-ES.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*!
  2. * numbro.js language configuration
  3. * language : Spanish
  4. * locale: Spain
  5. * author : Hernan Garcia : https://github.com/hgarcia
  6. */
  7. (function () {
  8. 'use strict';
  9. var language = {
  10. langLocaleCode: 'es-ES',
  11. cultureCode: 'es-ES',
  12. delimiters: {
  13. thousands: '.',
  14. decimal: ','
  15. },
  16. abbreviations: {
  17. thousand: 'k',
  18. million: 'mm',
  19. billion: 'b',
  20. trillion: 't'
  21. },
  22. ordinal: function (number) {
  23. var b = number % 10;
  24. return (b === 1 || b === 3) ? 'er' :
  25. (b === 2) ? 'do' :
  26. (b === 7 || b === 0) ? 'mo' :
  27. (b === 8) ? 'vo' :
  28. (b === 9) ? 'no' : 'to';
  29. },
  30. currency: {
  31. symbol: '€',
  32. position: 'postfix'
  33. },
  34. defaults: {
  35. currencyFormat: ',4 a'
  36. },
  37. formats: {
  38. fourDigits: '4 a',
  39. fullWithTwoDecimals: ',0.00 $',
  40. fullWithTwoDecimalsNoCurrency: ',0.00',
  41. fullWithNoDecimals: ',0 $'
  42. }
  43. };
  44. // CommonJS
  45. if (typeof module !== 'undefined' && module.exports) {
  46. module.exports = language;
  47. }
  48. // Browser
  49. if (typeof window !== 'undefined' && window.numbro && window.numbro.culture) {
  50. window.numbro.culture(language.cultureCode, language);
  51. }
  52. }.call(typeof window === 'undefined' ? this : window));