RESOURCEBUNDLE_LOCALES(3) 1 RESOURCEBUNDLE_LOCALES(3)
ResourceBundle::getLocales - Get supported locales
Object oriented style
SYNOPSIS
public array ResourceBundle::getLocales (string $bundlename)
DESCRIPTION
Procedural style
array resourcebundle_locales (string $bundlename)
Get available locales from ResourceBundle name.
PARAMETERS
o $bundlename
- Path of ResourceBundle for which to get available locales, or empty string for default locales list.
RETURN VALUES
Returns the list of locales supported by the bundle.
EXAMPLES
Example #1
resourcebundle_locales(3) example
<?php
$bundle = "/user/share/data/myapp";
echo join(PHP_EOL, resourcebundle_locales($bundle));
?>
The above example will output something similar to:
es
root
Example #2
OO example
<?php
$bundle = "/usr/share/data/myapp";
$r = new ResourceBundle( 'es', $bundle);
echo join("
", $r->getLocales($bundle));
?>
The above example will output something similar to:
es
root
SEE ALSO
resourcebundle_get(3).
PHP Documentation Group RESOURCEBUNDLE_LOCALES(3)