Translator
class Translator extends Translator
Class Translator.
Properties
protected Filesystem | $files |
Methods
__construct(Loader $loader, string $locale, Filesystem $files)
Translator constructor.
void
addLines(array $lines, string $locale, string $namespace = '*')
Add translation lines to the given locale.
array
fetch(string $local)
Fetch all language line from a local.
string|array|null
getLine(string $namespace, string $group, string $locale, string $item, array $replace)
Retrieve a language line out the loaded array.
void
load(string $namespace, string $group, string $locale)
Load the specified language group.
bool
isLoaded(string $namespace, string $group, string $locale)
Determine if the given group has been loaded.
Details
at line 29
__construct(Loader $loader, string $locale, Filesystem $files)
Translator constructor.
at line 42
void
addLines(array $lines, string $locale, string $namespace = '*')
Add translation lines to the given locale.
at line 56
array
fetch(string $local)
Fetch all language line from a local.
at line 103
protected string|array|null
getLine(string $namespace, string $group, string $locale, string $item, array $replace)
Retrieve a language line out the loaded array.
at line 125
void
load(string $namespace, string $group, string $locale)
Load the specified language group.
at line 142
protected bool
isLoaded(string $namespace, string $group, string $locale)
Determine if the given group has been loaded.