Translator
in
Minimal translator contract so that the core works without Laravel.
Keys use the form "group.key" (e.g. "labels.due_date", "rules.BR-CO-25.message").
Table of Contents
Methods
- addPath() : self
- Registers a directory with {locale}/{group}.php files for a namespace (e.g. "quittio-de").
- get() : string
- has() : bool
- locale() : string
Methods
addPath()
Registers a directory with {locale}/{group}.php files for a namespace (e.g. "quittio-de").
public
addPath(string $path[, string $namespace = '*' ]) : self
Parameters
- $path : string
- $namespace : string = '*'
Return values
selfget()
public
get(string $key[, array<string, string|int> $replace = [] ][, string|null $locale = null ]) : string
Parameters
- $key : string
- $replace : array<string, string|int> = []
- $locale : string|null = null
Return values
stringhas()
public
has(string $key[, string|null $locale = null ]) : bool
Parameters
- $key : string
- $locale : string|null = null
Return values
boollocale()
public
locale() : string