Difference between #2 and #3 of
Localized version of CFormatter

Revision #3 has been created by marcovtwout on Mar 25, 2014, 1:11:01 PM with the memo:

CLocalizedFormatter
« previous (#2)

Changes

Title unchanged

Localized version of CFormatter

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

cformatter localized locale

Content changed

Update!
 
------------------
 
Since Yii 1.1.14, a [CLocalizedFormatter ](http://www.yiiframework.com/doc/api/1.1/CLocalizedFormatter) is available.
 
 
 
To replace the application component 'format', which is registered by CApplication by default, you can put this in your application 'components' config: 
 
 
 
```php 
'format' => array('class' => 'CLocalizedFormatter'),
 
```
 
 
Original article
 
------------------
 
 
The default CFormatter (accessible through Yii::app()->format) is not locale aware, unfortunately. Until it is, here is a quick and easy way to localize it, by extending the default class.

Put this file in your protected/components.
[...]

 
2 0
5 followers
Viewed: 10 115 times
Version: 1.1
Category: How-tos
Written by: marcovtwout
Last updated by: marcovtwout
Created on: Oct 26, 2012
Last updated: 10 years ago
Update Article

Revisions

View all history