|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-11-14 12:57 UTC] ckunep at fromru dot com
Description:
------------
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:
D:\www\german\htdocs\locales\en.txt
D:\www\german\htdocs\locales\en.res
D:\www\german\htdocs\locales\en_US.txt
D:\www\german\htdocs\locales\en_US.res
D:\www\german\htdocs\locales\root.txt
D:\www\german\htdocs\locales\root.res
RES-files generated by ICU's genrb.exe.
Test script:
---------------
$directory = dirname($_SERVER['SCRIPT_FILENAME']) . DIRECTORY_SEPATATOR . 'locales';
print_r(resourcebundle_locales($directory));
Expected result:
----------------
Array
{
[0] => "en"
[1] => "en_US"
[2] => "root"
}
Actual result:
--------------
nothing
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 18:00:01 2025 UTC |
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. Code: is_file('D:\www\german\htdocs\locales\package.dat') == true; print_r(resourcebundle_locales('D:\www\german\htdocs\locales\package')); After script execution the "package.dat" file is locked on. I managed to delete the file only with the help of Unlocker.