Polyglot\Services\Lang::get PHP Метод

get() публичный Метод

Get the translation for the given key, or fallback to fallback locale
public get ( string $key, array $replace = [], string $locale = null ) : string
$key string
$replace array
$locale string
Результат string
    public function get($key, array $replace = array(), $locale = null)
    {
        // Get translation and fallback
        $fallback = $this->fallbackLocale();
        $translation = parent::get($key, $replace, $locale);
        if ($translation == $key and $fallback !== $this->locale) {
            return parent::get($key, $replace, $fallback);
        }
        return $translation;
    }