Порезал лишнее
This commit is contained in:
@ -152,39 +152,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
//Функция для перевода текста без применения GetText
|
||||
/*
|
||||
закоментил так как есть в tools.php
|
||||
function trt($text) {
|
||||
global $db,$lng,$Schema;
|
||||
|
||||
$language_id=1;
|
||||
if($lng=='kz') $language_id=2;
|
||||
if($lng=='en') $language_id=3;
|
||||
|
||||
$result='';
|
||||
$sql='select translation from '.$Schema.'_translations where del=false and language_id='.$language_id.' and identifier=\''.$text.'\';';
|
||||
$res = NULL;
|
||||
try
|
||||
{
|
||||
$res = $db->query($sql);
|
||||
}catch (Exception $e)
|
||||
{
|
||||
echo $e->getMessage();
|
||||
}
|
||||
if($res!=NULL && $res->rowCount()>0)
|
||||
{
|
||||
while ($row = $res->fetch(PDO::FETCH_NUM))
|
||||
{
|
||||
$result=$row[0];
|
||||
}
|
||||
}else
|
||||
{
|
||||
$result=str_replace("_", " ", $text);
|
||||
}
|
||||
return $result;
|
||||
}*/
|
||||
|
||||
//Перевод для строки в которой встречаются подстроки вида: trt('')
|
||||
function parseGT($text)
|
||||
{
|
||||
@ -204,7 +171,7 @@
|
||||
if($pos2 !== false)
|
||||
{
|
||||
$result.=substr($text, $cut, $pos1 - $cut );
|
||||
$result.=__(substr($text, $pos1+3, $pos2 - $pos1 - 3 ));
|
||||
//$result.=__(substr($text, $pos1+3, $pos2 - $pos1 - 3 ));
|
||||
$toTranslate=substr($text, $pos1+$pLen+1, $pos2 - $pos1 - $pLen-1 );
|
||||
$result.=trt($toTranslate);
|
||||
$cut=$pos2+2;
|
||||
|
||||
Reference in New Issue
Block a user