ModuleYamlLoader
class ModuleYamlLoader extends ArrayLoader (View source)
Loads yaml localisations across all modules simultaneously.
Note: This will also convert rails yml plurals into symfony standard format. Acts as a YamlFileLoader, but across a list of modules
Properties
protected | Reader | $reader | Message reader |
Methods
public
MessageCatalogue
load(mixed $resource, string $locale, string $domain = 'messages')
No description
protected
array
normaliseMessages(array $messages, string $locale)
Normalises plurals in messages from rails-yaml format to symfony.
protected
string
normaliseMessage(string $key, mixed $value, string $locale)
Normalise rails-yaml plurals into pipe-separated rules
Details
MessageCatalogue
load(mixed $resource, string $locale, string $domain = 'messages')
No description
Reader
getReader()
No description
$this
setReader(Reader $reader)
No description
protected array
loadMessages(string $path, string $locale)
Load messages
protected array
normaliseMessages(array $messages, string $locale)
Normalises plurals in messages from rails-yaml format to symfony.
protected string
normaliseMessage(string $key, mixed $value, string $locale)
Normalise rails-yaml plurals into pipe-separated rules