angeldanielperegrino/numbers2wordsmx

它可以拼写数字(和货币)!

2.3.8 2016-11-18 22:56 UTC

This package is not auto-updated.

Last update: 2024-09-23 13:32:21 UTC


README

numbers2words(适用于墨西哥比索,例如两千一百五十万八千七百比索 87/100 M.N.)

基于 jurchiks/numbers2words 包

该库旨在用于通用数字拼写,例如在法律文件和账单中。

支持的语言(ISO 639-1 语言代码)

  • 英语('en')
  • 爱沙尼亚语('et')
  • 拉脱维亚语('lv')
  • 立陶宛语('lt')
  • 俄语('ru')
  • 西班牙语('es')

支持货币(ISO 4217 货币代码)

  • 英镑('GBP')
  • 欧元('EUR')
  • 拉脱维亚拉特('LVL')
  • 立陶宛立特('LTL')
  • 俄罗斯卢布('RUR')
  • 美元('USD')

如果您发现任何问题,请报告!

用法

use js\tools\numbers2wordsmx\Speller;

Speller::spellNumber(123, Speller::LANGUAGE_RU);
// output: сто двадцать три
Speller::spellCurrency(123.45, Speller::LANGUAGE_ENGLISH, Speller::CURRENCY_EURO, true, true);
// output: one hundred and twenty three euro and forty five cents