|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63388 Locale::getDisplayRegion returns wrong results
Submitted: 2012-10-29 21:31 UTC Modified: 2016-04-11 13:10 UTC
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: marcosdsanchez at gmail dot com Assigned:
Status: Not a bug Package: intl (PECL)
PHP Version: 5.3.18 OS: mac os x 10.8.2
Private report: No CVE-ID: None
 [2012-10-29 21:31 UTC] marcosdsanchez at gmail dot com
Locale::getDisplayRegion does not return localized country names for some 


  echo Locale::getDisplayRegion('en_KY', 'hy_AM');


It should return instead the localized name of "Cayman Islands".


Test script:

Expected result:
I expect the method to return an appropriately localized display name for the 
regions of the hy_AM locale. It returns the country code instead.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-11 13:10 UTC]
-Status: Open +Status: Not a bug
 [2016-04-11 13:10 UTC]
Thanks for the report, better late than never too look into it.

With todays PHP-7.0 and ICU 57.1 i don't reproduce this behavior. Fe

php.exe -r "echo Locale::getDisplayRegion('de-ch');"
php.exe -r "echo Locale::getDisplayRegion('de-de');"

Unfortunately no ICU version is given in the ticket, but most likely it is something not PHP related. Every version of ICU improves the data set, so that was most likely the issue.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 21:01:30 2024 UTC