示例#1
0
文件: Locale.php 项目: Artea/freebeer
                fbDebug::dump($rv, '$rv');
            }
            $_locale = fbLocale::getLocale(LC_MONETARY);
            fbDebug::dump($_locale, '$_locale');
            $localeconv_cache[$locale] = localeconv();
            fbDebug::dump($localeconv_cache[$locale], '$localeconv_cache[$locale]');
            if (!$get_locale) {
                fbLocale::popLocale(LC_MONETARY);
            }
        }
        $lc = $localeconv_cache[$locale];
        fbDebug::dump($lc, '$lc');
        if (is_null($digits)) {
            $digits = $lc['int_frac_digits'];
        }
        $rv = number_format($number, $digits, $lc['mon_decimal_point'], $lc['mon_thousands_sep']);
        $n = strpos($rv, '-');
        if ($n !== false) {
            $rv = str_replace('-', $lc['negative_sign'], $rv);
        }
        fbDebug::leave($rv);
        return $rv;
    }
    /// \todo implment fbLocale::moneyFormat()
    function moneyFormat($number, $digits = null, $locale = null)
    {
    }
}
// get default locale
fbLocale::_init();