Translator::locale()

string locale() Get the default locale being used. Return Value string

Translator::parseKey()

array parseKey(string $key) Parse a key into namespace, group, and item. Parameters string $key Return Value array

Translator::setFallback()

void setFallback(string $fallback) Set the fallback locale being used. Parameters string $fallback Return Value void

Translator::macro()

static void macro(string $name, callable $macro) Register a custom macro. Parameters string $name callable $macro Return Value void

Translator::has()

bool has(string $key, string|null $locale = null, bool $fallback = true) Determine if a translation exists. Parameters string $key string|null $locale bool $fallback Return Value bool

Translator::getLocale()

string getLocale() Get the default locale being used. Return Value string

Translator::hasForLocale()

bool hasForLocale(string $key, string|null $locale = null) Determine if a translation exists for a given locale. Parameters string $key string|null $locale Return Value bool

Translator::hasMacro()

static bool hasMacro(string $name) Checks if macro is registered. Parameters string $name Return Value bool

Translator::getSelector()

MessageSelector getSelector() Get the message selector instance. Return Value MessageSelector

Translator::get()

string|array|null get(string $key, array $replace = array(), string|null $locale = null, bool $fallback = true) Get the translation for the given key. Parameters string $key array $replace string|null $locale bool $fallback Return Value string|array|null