pronamic / wp-money
WordPress Money 库。
v2.4.3
2023-11-06 14:07 UTC
Requires
- php: >=7.4
- pronamic/wp-number: ^1.3
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.4
- koodimonni-language/de_de: *
- koodimonni-language/fr_fr: *
- koodimonni-language/nl_nl: *
- overtrue/phplint: ^9.0
- php-coveralls/php-coveralls: ^2.4
- phpmd/phpmd: ^2.4
- pronamic/pronamic-cli: ^1.1
- pronamic/wp-coding-standards: ^1.3
- roots/wordpress: ^6.0
- vlucas/phpdotenv: ^2.0
- wp-phpunit/wp-phpunit: ^6.1
- yoast/phpunit-polyfills: ^1.0
README
非断行空格
在货币格式中,使用非断行空格是很明智的。
在文字处理和数字排版中,非断行空格(" "),也称为不可断行空格、不可拆分空格(NBSP)、固定空格或实空格,是一种防止在其位置自动换行的空格字符。
来源:https://en.wikipedia.org/wiki/Non-breaking_space#Keyboard_entry_method
WordPress 过滤器
pronamic_money_default_format
function prefix_pronamic_money_default_format( $format ) { /* translators: 1: currency symbol, 2: amount, 3: currency code */ return _x( '%1$s%2$s', 'default money format', 'pronamic-ideal' ); } add_filter( 'pronamic_money_default_format', 'prefix_pronamic_money_default_format' );
灵感
- https://php.ac.cn/manual/en/function.money-format.php
- https://github.com/datasets/currency-codes
- https://github.com/cknow/laravel-money
- https://github.com/akaunting/money
- https://github.com/moneyphp/money
- https://github.com/Torann/laravel-currency
- https://github.com/davidkalosi/js-money
- https://github.com/scurker/currency.js
- https://github.com/woocommerce/woocommerce/blob/3.3.5/includes/wc-core-functions.php#L284-L464
- https://github.com/woocommerce/woocommerce/blob/3.3.5/i18n/locale-info.php
- http://trigeminal.fmsinc.com/samples/setlocalesample2.asp
- http://moneyphp.org/
- https://packagist.org.cn/?q=money
- https://packagist.org.cn/?q=currency
- https://yarn.npmjs.net.cn/en/packages?q=money
- https://yarn.npmjs.net.cn/en/packages?q=currency
- https://www.currency-iso.org/en/home.html
- https://docs.oracle.com/javase/7/docs/api/java/util/Currency.html
- https://wp-languages.github.io/
- https://php.ac.cn/manual/en/function.sscanf.php
- https://php.ac.cn/manual/en/numberformatter.create.php
- https://git.tibidono.com/package/money-datatype/blob/0.1.13/src/Money/TaxedMoney.php
- https://frontstuff.io/how-to-handle-monetary-values-in-javascript
- https://github.com/sarahdayan/dinero.js