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
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
load($resource, $locale, $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