{@inheritdoc}

@param  string  $key
@param  array   $replace
@param  string  $locale
@return string
352447
public function get($key, array $replace = array(), $locale = null)
    {
        return $this->lang->get($key, $replace, $locale);
    }
722132
public function removeTranslation($locale, $domain, $key)
    {
        $unit = $this->findByDomainAndKey($domain, $key);
        $unit->deleteTranslation($locale);
        $this->persist($unit);
    }
1339499
private function getRealKey(string $key, string $locale = null): string
    {
        if (!$locale) {
            $locale = $this->defaultLanguage;
        }
        
        if (\strpos($key, '.') === false) {
            $key = implode([$this->defualtCategory, $key], '.');
        }

        return implode('.', [$locale, $key]);
    }
915875
private function retrievePattern($locale, $key)
    {
        $resBundle = $this->getResourceBundle($locale);

        $pattern = $resBundle->get($key);

        if ($pattern === null) {
            throw new \IntlException($resBundle->getErrorMessage(), $resBundle->getErrorCode());
        }

        return $pattern;
    }
761755
final protected static function replaceKey($data, $search, $replace)
    {
        foreach ($data as $key => $value) {
            if (is_array($value)) {
                $data[$key] = $value = self::replaceKey($data[$key], $search, $replace);
            }
            if ($key == $search) {
                $data[$replace] = $value;
                unset($data[$search]);
            }
        }

        return $data;
    }
423826
public function get(string $key, string $locale = null)
    {
        $realKey = $this->getRealKey($key, $locale);

        return ArrayHelper::get($this->messages, $realKey);
    }
1211741
public function header($key, $value, $replace = true)
	{
		if (empty($this->headers[$key]))
		{
			$this->headers[$key] = array();
		}
		if ($replace)
		{
			$this->headers[$key] = array($value);
		}
		else
		{
			$this->headers[$key][] = $value;
		}

		return $this;
	}
389610
public function translate($key, $defaultValue = '', $locale = null) {
		return $this->translation->translate($key, $defaultValue, $locale);
	}
1039207
public function replaceKey($data, $replace_key, $key = "--key--")
    {
        foreach ($data as $elem_key => $elem) {
            if (is_array($elem)) {
                $data[$elem_key] = $this->replaceKey($elem, $replace_key);
            } else {
                if ($data[$elem_key] == $key) {
                    $data[$elem_key] = $replace_key;
                }
            }
        }
        return $data;
    }
513160
public function translate($key, $translation, $locale = null) {
        $this->translations[$this->locale($locale)][$key] = $translation;

        return $translation;
    }
700308
static function item($name,$replace = []){
		
		// get info name and key
		$prop = self::engineName($name);
		
		$lang = $prop->key;
		
		// check language
		if(isset(self::$language[$prop->app][$prop->key])){
			$lang = self::$language[$prop->app][$prop->key];
		}

		$map_replace = [
			'today' => date(Config::read('App.Base.fmt_date'))
		];
		
		// replace string
		$replace = array_merge($replace,$map_replace);
		foreach($replace as $index => $text){
			$i[] = '{'.$index.'}';
			$t[] = $text;
		}
		$lang = str_replace($i,$t,$lang);

		return $lang;
	}
814886
public function get($key, $locale = null)
    {
        return $this->translator->get("log-viewer::levels.$key", [], $locale ?: $this->getLocale());
    }
168571
public function forgetTranslation(string $key, string $locale)
    {
        $translations = $this->getTranslations($key);

        unset($translations[ $locale ]);

        $this->setAttribute($key, $translations);

        return $this;
    }
84297
public function get($key, $replacement = array(), $locale = null) {
        $locale = $this->locale($locale);

        $translation = $this->getTranslation($key, $locale);

        return $this->replace(
            $translation, $replacement
        );
    }
1119737
public function has($key, $locale = null) {
        $locale = $this->locale($locale);

        return $this->get($key, [], $locale) !== $key;
    }
161629
public function translate($key, $translation, $locale = null) {
        $locale = $this->locale($locale);

        return Lang::get($key, null, $locale);
    }
1033663
protected function replaceLastSequentially($search, array $replace, $subject, $encoding, &$count)
	{
		$offset = null;
		$lenSearch = mb_strlen($search, $encoding);

		foreach ($replace as $value) {
			$subject = $this->replaceLastOne($search, $value, $subject, $encoding, $count, $offset, $lenSearch);
			if($offset === false)
				break;
		}
		return $subject;
	}