public function translateString($str, array $params = [], $onlyPrefix = null)
{
$baseText = $this->get($str);
$baseText = $this->parseTranslation(($baseText !== null and ($onlyPrefix === null or strpos($str, $onlyPrefix) === 0)) ? $baseText : $str, $onlyPrefix);
foreach ($params as $i => $p) {
$baseText = str_replace("{%{$i}}", $this->parseTranslation((string) $p), $baseText, $onlyPrefix);
}
return str_replace("%0", "", $baseText);
//fixes a client bug where %0 in translation will cause freeze
}