|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63515 Getting supported locales problem
Submitted: 2012-11-14 12:57 UTC Modified: 2021-06-27 04:22 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: ckunep at fromru dot com Assigned: cmb (profile)
Status: No Feedback Package: intl (PECL)
PHP Version: 5.4.8 OS: Windows 7 Pro x64
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-11-14 12:57 UTC] ckunep at fromru dot com
I tried to resolve a list of available locales in the "locales" folder. But get nothing.

$_SERVER['SCRIPT_FILENAME'] == D:\www\german\htdocs\index.php.

Folder structure:

RES-files generated by ICU's genrb.exe.

Test script:
$directory = dirname($_SERVER['SCRIPT_FILENAME']) . DIRECTORY_SEPATATOR . 'locales';

Expected result:
    [0] => "en"
    [1] => "en_US"
    [2] => "root"

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-14 13:47 UTC] ckunep at fromru dot com
Also I noticed that resourcebundle_locales() returns FALSE. I try to use resourcebundle_locales() to get locales list from package generated by ICU's pkgdata.exe, but it fails too.


is_file('D:\www\german\htdocs\locales\package.dat') == true;

After script execution the "package.dat" file is locked on. I managed to delete the file only with the help of Unlocker.
 [2016-09-29 11:22 UTC]
-Package: I18N and L10N related +Package: intl
 [2021-06-14 14:14 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-06-14 14:14 UTC]
> print_r(resourcebundle_locales($directory));

resourcebundle_locales() expects a file path, not a directory path.

> I try to use resourcebundle_locales() to get locales list from
> package generated by ICU's pkgdata.exe, but it fails too.

How exactly did you produce the "package"?  Did the PHP script
hang while reading the file?
 [2021-06-27 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Dec 04 20:01:27 2023 UTC