Ron*_*dog 2 zend-framework internationalization
有谁知道如何使用 zend 框架根据语言环境显示百分比格式?我在下面试过这个,但由于某种原因它不起作用:
$xx = Zend_Locale::getTranslation(null, 'PercentNumber'); // This outputs: "#,##0%" for locale 'en_us'
$percentage = Zend_Locale_Format::getNumber(133.3678, array('number_format' => $xx, 'locale' => $lang_LOCALE));
Run Code Online (Sandbox Code Playgroud)
$percentage 的输出是 133.3678。
谢谢。
| 归档时间: |
|
| 查看次数: |
1655 次 |
| 最近记录: |