Development

#3488 ([1.1] Undefined index in sfDateTimeFormatInfo for culture zh_HK)

You must first sign up to be able to contribute.

Ticket #3488 (new defect)

Opened 7 months ago

Last modified 7 months ago

[1.1] Undefined index in sfDateTimeFormatInfo for culture zh_HK

Reported by: angelsk Assigned to: fabien
Priority: major Milestone:
Component: i18n Version: 1.0.15
Keywords: zh_HK, culture, i18n, sfDateTimeFormatInfo Cc:
Qualification: Design decision

Description

I am working with a multilingual site. I am currently experiencing an error when I try to format a date in Chinese (culture: zh_HK).

Notice: Undefined index: wide in /var/www/html/sitename.com/lib/vendor/symfony/lib/i18n/sfDateTimeFormatInfo.class.php on line 346

The date format I'm using is: <?php echo format_date($articleSelection->getPubDate(), 'MMMM yyyy', $sf_user->getCulture()); ?>

Symfony version: /branches/1.1, revision: 8838

Attachments

patch_for_3488.patch (2.1 kB) - added by FabianLange on 05/13/08 09:34:51.
possible fix, but side effect on time zones order

Change History

05/13/08 08:44:28 changed by FabianLange

seems the problem originates from the ICU file / ICU file merging. There are abbreviated month names defined, which seems that the wide are overwritten.

05/13/08 09:21:34 changed by FabianLange

yep. problem comes from sfCultureInfo. I contacted the Author of the PRADO Team where this was taken from for ideas. As my check showed they have the same issue there.

05/13/08 09:34:51 changed by FabianLange

  • attachment patch_for_3488.patch added.

possible fix, but side effect on time zones order

05/13/08 09:37:32 changed by FabianLange

  • version set to 1.0.15.
  • qualification changed from Unreviewed to Design decision.

I attached a patch fixing this, whoever this introduces a side effect in the time zone order. I cannot judge if the behaviour is better, worse or just different from the old one. Perhaps that is even a bug in sfToolkit:arrayDeepMerge().

using sfToolkit:arrayDeepMerge() in sfCultureInfo at least solves the locale issue for incomplete arrays in the ICU file.

PS: This bug exists in sf1.0 as well