You are here

public function ArrayLoader::load in Plug 7

@api

Overrides LoaderInterface::load

1 call to ArrayLoader::load()
FileLoader::load in lib/Symfony/translation/Loader/FileLoader.php
@api
1 method overrides ArrayLoader::load()
FileLoader::load in lib/Symfony/translation/Loader/FileLoader.php
@api

File

lib/Symfony/translation/Loader/ArrayLoader.php, line 30

Class

ArrayLoader
ArrayLoader loads translations from a PHP array.

Namespace

Symfony\Component\Translation\Loader

Code

public function load($resource, $locale, $domain = 'messages') {
  $this
    ->flatten($resource);
  $catalogue = new MessageCatalogue($locale);
  $catalogue
    ->add($resource, $domain);
  return $catalogue;
}