interface Translator

Methods

mixed
get(string $key, array $replace = [], string|null $locale = null)

Get the translation for a given key.

string
choice(string $key, array|Countable|float|int $number, array $replace = [], string|null $locale = null)

Get a translation according to an integer value.

string
getLocale()

Get the default locale being used.

void
setLocale(string $locale)

Set the default locale.

Details

at line 14
mixed get(string $key, array $replace = [], string|null $locale = null)

Get the translation for a given key.

Parameters

string $key
array $replace
string|null $locale

Return Value

mixed

at line 19
string choice(string $key, array|Countable|float|int $number, array $replace = [], string|null $locale = null)

Get a translation according to an integer value.

Parameters

string $key
array|Countable|float|int $number
array $replace
string|null $locale

Return Value

string

at line 24
string getLocale()

Get the default locale being used.

Return Value

string

at line 29
void setLocale(string $locale)

Set the default locale.

Parameters

string $locale

Return Value

void