class IcuResFileLoader implements LoaderInterface
IcuResFileLoader loads translations from a resource bundle.
MessageCatalogue | load(mixed $resource, string $locale, string $domain = 'messages') Loads a locale. | |
array | flatten(ResourceBundle $rb, array $messages = array(), string $path = null) Flattens an ResourceBundle. |
Loads a locale.
mixed | $resource | A resource |
string | $locale | A locale |
string | $domain | The domain |
MessageCatalogue | A MessageCatalogue instance |
NotFoundResourceException | when the resource cannot be found |
InvalidResourceException | when the resource cannot be loaded |
Flattens an ResourceBundle.
The scheme used is: key { key2 { key3 { "value" } } } Becomes: 'key.key2.key3' => 'value'
This function takes an array by reference and will modify it
ResourceBundle | $rb | The ResourceBundle that will be flattened |
array | $messages | Used internally for recursive calls |
string | $path | Current path being parsed, used internally for recursive calls |
array | the flattened ResourceBundle |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Translation/Loader/IcuResFileLoader.html