diff --git a/CHANGELOG b/CHANGELOG index 79bd4d823..1760837e7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -16,6 +16,7 @@ Version 1.1.14 work in progress - Bug #2030: Fixed problem with MySQL 4.x: Undefined Index: Comment in CMysqlSchema (cebe) - Bug #2049: CStatElement relation with join option throw exception when key-field present on joined table (Yiivgeny) - Enh: Better CFileLogRoute performance (Qiang, samdark) +- Enh #1818: Created a CLocalizedFormatter application component that allows formatting values according to current locale (cebe) - Enh #1847: Added COutputCache::varyByLanguage to generate separate cache for different languages (Obramko) - Enh #1977: CFormatter::normalizeDateValue() now is protected instead of private to enable child classes to override it (etienneq) - Enh #2038: CFormatter::formatNtext() method can replace newlines with `
` not just with `Yii::app()->format->boolean(1).
+ * You might want to replace this component with {@link CLocalizedFormatter} to enable formatting based on the
+ * current locale settings.
*
* @property CHtmlPurifier $htmlPurifier The HTML purifier instance.
*
diff --git a/framework/utils/CLocalizedFormatter.php b/framework/utils/CLocalizedFormatter.php
index 5247a6812..a2323f180 100644
--- a/framework/utils/CLocalizedFormatter.php
+++ b/framework/utils/CLocalizedFormatter.php
@@ -18,7 +18,16 @@
*
* It uses {@link CApplication::locale} by default but you can set a custom locale by using {@link setLocale}-method.
*
- * For a list of recognizable format types, and details on how to call the formatter methods, see {@link CFormatter} documentation.
+ * For a list of recognizable format types, and details on how to call the formatter methods,
+ * see {@link CFormatter} documentation.
+ *
+ * To replace the application component 'format', which is registered by {@link CApplication} by default, you can
+ * put this in your application 'components' config:
+ *
+ * 'format' => array(
+ * 'class' => 'CLocalizedFormatter',
+ * ),
+ *
*
* @author Carsten Brandt