开发者

Can Zend_Measure detect the metric system?

开发者 https://www.devze.com 2023-02-09 21:26 出处:网络
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 thi

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

精彩评论

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