@@ -145,11 +145,11 @@ module.exports={
145145 "19" : "diecinueve" ,
146146 "20" : "veinte" ,
147147 "21" : "veintiuno" ,
148- "22" : "veintidos " ,
149- "23" : "veintitres " ,
148+ "22" : "veintidós " ,
149+ "23" : "veintitrés " ,
150150 "24" : "veinticuatro" ,
151151 "25" : "veinticinco" ,
152- "26" : "veintiseis " ,
152+ "26" : "veintiséis " ,
153153 "27" : "veintisiete" ,
154154 "28" : "veintiocho" ,
155155 "29" : "veintinueve" ,
@@ -378,6 +378,131 @@ module.exports={
378378}
379379
380380} , { } ] , 5 :[ function ( require , module , exports ) {
381+ module . exports = {
382+ "useLongScale" : false ,
383+ "baseSeparator" : "" ,
384+ "unitSeparator" : "" ,
385+ "generalSeparator" : "" ,
386+ "wordSeparator" : "" ,
387+ "base" : {
388+ "0" : "zero" ,
389+ "1" : "uno" ,
390+ "2" : "due" ,
391+ "3" : "tre" ,
392+ "4" : "quattro" ,
393+ "5" : "cinque" ,
394+ "6" : "sei" ,
395+ "7" : "sette" ,
396+ "8" : "otto" ,
397+ "9" : "nove" ,
398+ "10" : "dieci" ,
399+ "11" : "undici" ,
400+ "12" : "dodici" ,
401+ "13" : "tredici" ,
402+ "14" : "quattordici" ,
403+ "15" : "quindici" ,
404+ "16" : "sedici" ,
405+ "17" : "diciassette" ,
406+ "18" : "diciotto" ,
407+ "19" : "diciannove" ,
408+ "20" : "venti" ,
409+ "21" : "ventuno" ,
410+ "23" : "ventitré" ,
411+ "28" : "ventotto" ,
412+ "30" : "trenta" ,
413+ "31" : "trentuno" ,
414+ "33" : "trentatré" ,
415+ "38" : "trentotto" ,
416+ "40" : "quaranta" ,
417+ "41" : "quarantuno" ,
418+ "43" : "quarantatré" ,
419+ "48" : "quarantotto" ,
420+ "50" : "cinquanta" ,
421+ "51" : "cinquantuno" ,
422+ "53" : "cinquantatré" ,
423+ "58" : "cinquantotto" ,
424+ "60" : "sessanta" ,
425+ "61" : "sessantuno" ,
426+ "63" : "sessantatré" ,
427+ "68" : "sessantotto" ,
428+ "70" : "settanta" ,
429+ "71" : "settantuno" ,
430+ "73" : "settantatré" ,
431+ "78" : "settantotto" ,
432+ "80" : "ottanta" ,
433+ "81" : "ottantuno" ,
434+ "83" : "ottantatré" ,
435+ "88" : "ottantotto" ,
436+ "90" : "novanta" ,
437+ "91" : "novantuno" ,
438+ "93" : "novantatré" ,
439+ "98" : "novantotto" ,
440+ "100" : "cento" ,
441+ "101" : "centuno" ,
442+ "108" : "centootto" ,
443+ "180" : "centottanta" ,
444+ "201" : "duecentuno" ,
445+ "301" : "trecentuno" ,
446+ "401" : "quattrocentuno" ,
447+ "501" : "cinquecentuno" ,
448+ "601" : "seicentuno" ,
449+ "701" : "settecentuno" ,
450+ "801" : "ottocentuno" ,
451+ "901" : "novecentuno"
452+ } ,
453+ "unitExceptions" : {
454+ "1" : "un"
455+ } ,
456+ "units" : [
457+ {
458+ "singular" : "cento" ,
459+ "avoidPrefixException" : [
460+ 1
461+ ]
462+ } ,
463+ {
464+ "singular" : "mille" ,
465+ "plural" : "mila" ,
466+ "avoidPrefixException" : [
467+ 1
468+ ]
469+ } ,
470+ {
471+ "singular" : "milione" ,
472+ "plural" : "milioni"
473+ } ,
474+ {
475+ "singular" : "miliardo" ,
476+ "plural" : "miliardi"
477+ } ,
478+ {
479+ "singular" : "bilione" ,
480+ "plural" : "bilioni"
481+ } ,
482+ {
483+ "singular" : "biliardo" ,
484+ "plural" : "biliardi"
485+ } ,
486+ {
487+ "singular" : "trilione" ,
488+ "plural" : "trilioni"
489+ } ,
490+ {
491+ "singular" : "triliardo" ,
492+ "plural" : "triliardi"
493+ } ,
494+ {
495+ "singular" : "quadrilione" ,
496+ "plural" : "quadrilioni"
497+ } ,
498+ {
499+ "singular" : "quadriliardo" ,
500+ "plural" : "quadriliardi"
501+ }
502+ ]
503+ }
504+
505+ } , { } ] , 6 :[ function ( require , module , exports ) {
381506module . exports = {
382507 "useLongScale" : false ,
383508 "baseSeparator" : " e " ,
@@ -495,18 +620,71 @@ module.exports={
495620 ]
496621}
497622
498- } , { } ] , 6 :[ function ( require , module , exports ) {
623+ } , { } ] , 7 :[ function ( require , module , exports ) {
624+ module . exports = {
625+ "useLongScale" : false ,
626+ "baseSeparator" : " " ,
627+ "unitSeparator" : "và " ,
628+ "base" : {
629+ "0" : "không" ,
630+ "1" : "một" ,
631+ "2" : "hai" ,
632+ "3" : "ba" ,
633+ "4" : "bốn" ,
634+ "5" : "năm" ,
635+ "6" : "sáu" ,
636+ "7" : "bảy" ,
637+ "8" : "tám" ,
638+ "9" : "chín" ,
639+ "10" : "mười" ,
640+ "15" : "mười lăm" ,
641+ "20" : "hai mươi" ,
642+ "21" : "hai mươi mốt" ,
643+ "25" : "hai mươi lăm" ,
644+ "30" : "ba mươi" ,
645+ "31" : "ba mươi mốt" ,
646+ "40" : "bốn mươi" ,
647+ "41" : "bốn mươi mốt" ,
648+ "45" : "bốn mươi lăm" ,
649+ "50" : "năm mươi" ,
650+ "51" : "năm mươi mốt" ,
651+ "55" : "năm mươi lăm" ,
652+ "60" : "sáu mươi" ,
653+ "61" : "sáu mươi mốt" ,
654+ "65" : "sáu mươi lăm" ,
655+ "70" : "bảy mươi" ,
656+ "71" : "bảy mươi mốt" ,
657+ "75" : "bảy mươi lăm" ,
658+ "80" : "tám mươi" ,
659+ "81" : "tám mươi mốt" ,
660+ "85" : "tám mươi lăm" ,
661+ "90" : "chín mươi" ,
662+ "91" : "chín mươi mốt" ,
663+ "95" : "chín mươi lăm"
664+ } ,
665+ "units" : [
666+ "trăm" ,
667+ "ngàn" ,
668+ "triệu" ,
669+ "tỷ" ,
670+ "nghìn tỷ"
671+ ] ,
672+ "unitExceptions" : [ ]
673+ }
674+ } , { } ] , 8 :[ function ( require , module , exports ) {
499675'use strict' ;
500676exports = module . exports = writtenNumber ;
501677var util = require ( './util' ) ;
502678
503- var languages = [ 'en' , 'es' , 'pt' , 'fr' , 'eo' ] ;
679+ var languages = [ 'en' , 'es' , 'pt' , 'fr' , 'eo' , 'it' , 'vi' ] ;
504680var i18n = {
505681 en : require ( './i18n/en.json' ) ,
506682 es : require ( './i18n/es.json' ) ,
507683 pt : require ( './i18n/pt.json' ) ,
508684 fr : require ( './i18n/fr.json' ) ,
509- eo : require ( './i18n/eo.json' )
685+ eo : require ( './i18n/eo.json' ) ,
686+ it : require ( './i18n/it.json' ) ,
687+ vi : require ( './i18n/vi.json' ) ,
510688} ;
511689exports . i18n = i18n ;
512690
@@ -535,12 +713,13 @@ writtenNumber.defaults = {
535713
536714function writtenNumber ( n , options ) {
537715 options = options || { } ;
538- if ( options . lang ) options . lang = options . lang . toLowerCase ( ) ;
539716 options = util . defaults ( options , writtenNumber . defaults ) ;
540717
541718 n = Math . round ( + n ) ;
542719
543- var language = i18n [ options . lang ] ;
720+ var language = typeof options . lang === 'string'
721+ ? i18n [ options . lang ]
722+ : options . lang ;
544723 var scale = language . useLongScale ? longScale : shortScale ;
545724 var unit ;
546725
@@ -622,7 +801,7 @@ function handleSmallerThan100(n, language, unit, baseCardinals, options) {
622801 return baseCardinals [ dec ] ;
623802}
624803
625- } , { "./i18n/en.json" :1 , "./i18n/eo.json" :2 , "./i18n/es.json" :3 , "./i18n/fr.json" :4 , "./i18n/pt .json" :5 , "./util" : 7 } ] , 7 :[ function ( require , module , exports ) {
804+ } , { "./i18n/en.json" :1 , "./i18n/eo.json" :2 , "./i18n/es.json" :3 , "./i18n/fr.json" :4 , "./i18n/it .json" :5 , "./i18n/pt.json" : 6 , "./i18n/vi.json" : 7 , "./util" : 9 } ] , 9 :[ function ( require , module , exports ) {
626805'use strict' ;
627806/**
628807 * Merges a set of default keys with a target object
@@ -645,5 +824,5 @@ function defaults(target, defs) {
645824}
646825exports . defaults = defaults ;
647826
648- } , { } ] } , { } , [ 6 ] ) ( 6 )
827+ } , { } ] } , { } , [ 8 ] ) ( 8 )
649828} ) ;
0 commit comments