Issues

ZF-3785: Zend_Locale get wrong result for the language settings.

Issue Type: Bug Created: 2008-07-28T22:27:26.000+0000 Last Updated: 2008-08-08T14:00:15.000+0000 Status: Resolved Fix version(s): - 1.6.1 (15/Sep/08)

Reporter: S├ębastien Gallet (haijin) Assignee: Thomas Weidner (thomas) Tags: - Zend_Locale

Related issues: Attachments: - Zend_Locale.patch

Description

array_merge was replaced by the operator + but the merge parameters were reversed causing lesser priority language settings to override the most important ones.

getBrowser()); echo << Note ==== I'm getting this: LC\_COLLATE=C;LC\_CTYPE=English\_United States.1252;LC\_MONETARY=C;LC\_NUMERIC=C;LC\_TIME=C fr-fr,fr;q=0.8,en-us;q=0.6,en;q=0.4,ja;q=0.2 Array ( [en] => 1 [fr\_FR] => 1 [fr] => 1 [en\_US] => 0.6 [ja] => 0.2 ) But I'm excpeting that: LC\_COLLATE=C;LC\_CTYPE=English\_United States.1252;LC\_MONETARY=C;LC\_NUMERIC=C;LC\_TIME=C fr-fr,fr;q=0.8,en-us;q=0.6,en;q=0.4,ja;q=0.2 Array ( [fr\_FR] => 1 [fr] => 1 [en\_US] => 0.6 [en] => 0.6 [ja] => 0.2 ) PS: I also wonder why the qualities are not preserved: [fr\_FR] should be 0.8 and [en] 0.4 Is it done on purpose? END; ### Comments Posted by S├ębastien Gallet (haijin) on 2008-07-28T22:28:15.000+0000 Here the fix for that bug. Posted by Thomas Weidner (thomas) on 2008-07-28T23:17:14.000+0000 Please give example code and LC setting to show your problem. Actually the unittests run through without showing problems and they are using multiple locales to test the priority. Posted by Thomas Weidner (thomas) on 2008-08-08T13:59:23.000+0000 The issue has been fixed for the trunk. Not sure for RC2 as I18N changes have been put on hold until 1.7 due to BC problems.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts