-
-
Save mauriciogofas/a146c8f475a0a75fff3d to your computer and use it in GitHub Desktop.
Default Money Formatting for the BR in Sprout Invoices
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 | |
// Brazilian money simbol in Sprout Invoices | |
function set_br_reais_localeconv( $locale = array() ) { | |
$locale = array( | |
'decimal_point' => '.', | |
'thousands_sep' => '', | |
'int_curr_symbol' => 'BRL', | |
'currency_symbol' => 'R$', | |
'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_br_reais_localeconv' ); | |
// End Brazilian money simbol in Sprout Invoices |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment