Make Formats default values international #1818

fleuryc opened this Issue Dec 6, 2012 · 5 comments


4 participants

fleuryc commented Dec 6, 2012


I know you can configure and all as you wish.
But it would be nice if instead of plain array('No', 'Yes') and all, we had the same but translated in the locale as default (and still customizable).

This applies to every formats that can be localized (date, time, number...).



magefad commented Dec 6, 2012


cebe was assigned Dec 7, 2012


cebe commented Dec 7, 2012

When we do this change we should also set all the date, time and number formats to the locale specific per default.
For 1.1.x this should be an optional setting.


cebe commented Dec 7, 2012

Maybe we could introduce a CLocalizedFormatter that sets localized format configuration on init().

Usage would be configure application config like this (replace original formatter):

'components' => array(
    'format' => array(
        'class' => 'CLocalizedFormatter',

@yiisoft/core-developers what do you think about this?

fleuryc commented Dec 7, 2012

@cebe seems good to me!


sauloonze commented Dec 7, 2012


@cebe cebe added a commit to cebe/yii that referenced this issue Jan 30, 2013

@cebe cebe Created a LocalizedFormatter class
issue #1818

cebe closed this May 27, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment