Created
January 30, 2015 16:30
-
-
Save dancameron/a10a8a7829212687c646 to your computer and use it in GitHub Desktop.
Default Money Formatting for the US
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function set_us_dollars_localeconv( $locale = array() ) { | |
$locale = array( | |
'decimal_point' => '.', | |
'thousands_sep' => '', | |
'int_curr_symbol' => 'USD', | |
'currency_symbol' => '$', | |
'mon_decimal_point' => '.', | |
'mon_thousands_sep' => ',', | |
'positive_sign' => '', | |
'negative_sign' => '-', | |
'int_frac_digits' => 2, | |
'frac_digits' => 2, | |
'p_cs_precedes' => 1, | |
'p_sep_by_space' => 0, | |
'n_cs_precedes' => 1, | |
'n_sep_by_space' => 0, | |
'p_sign_posn' => 1, | |
'n_sign_posn' => 1, | |
'grouping' => array(), | |
'mon_grouping' => array( 3, 3 ), | |
); | |
return $locale; | |
}; | |
add_filter( 'si_localeconv', 'set_us_dollars_localeconv' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment