开发者

Can Zend_Measure detect the metric system?

I have my Zend_Locale setup using the browser's locale b开发者_开发问答ut I want to use it to show me the right units, so for US it should show temperatures in Fahrenheit and in NL in Celcius. Is this built in in ZF or do I need to create my own implementation?


You can simply set a Zend_Locale instance to the registry like shown below. With this notation you can forget about setting the locale manually with each instance when you want to use the same locale multiple times.

$locale = new Zend_Locale('de_AT');
Zend_Registry::set('Zend_Locale', $locale);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜