From ad1cf1f1999e4605efc6690f27dfccf2ab1b0c50 Mon Sep 17 00:00:00 2001 From: Justin Martin Date: Mon, 5 Dec 2011 21:35:52 +0000 Subject: [PATCH] Fixed and clarified both the procedural and OOP variants, and updated examples. Addresses bug #53995. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@320463 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/intl/resourcebundle/locales.xml | 32 ++++++++++++++--------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/reference/intl/resourcebundle/locales.xml b/reference/intl/resourcebundle/locales.xml index 7c7bb2f169..32fc564266 100644 --- a/reference/intl/resourcebundle/locales.xml +++ b/reference/intl/resourcebundle/locales.xml @@ -15,7 +15,7 @@ array ResourceBundle::getLocales - + stringbundlename Procedural style @@ -23,13 +23,10 @@ array resourcebundle_locales - ResourceBundler + stringbundlename - Get the list of locales supported by the bundle. The list is taken from the bundle table - named res_index which should contain a table named InstalledLocales, - which contains locales as keys. This bundle should be either in data directory as .res file or - part of the .dat file for this function to work. + Get available locales from ResourceBundle name. @@ -38,10 +35,11 @@ - r + bundlename - ResourceBundle object. + Path of ResourceBundle for which to get available locales, or + empty string for default locales list. @@ -64,23 +62,31 @@ ]]> + &example.outputs.similar; + + + OO example getLocales()); +$bundle = "/usr/share/data/myapp"; +$r = new ResourceBundle( 'es', $bundle); +echo join("\n", $r->getLocales($bundle)); ?> ]]> - &example.outputs; + &example.outputs.similar;