// Add translate() as deprecated
This commit is contained in:
1 parent
6ae0dbb4ca
commit
66522c4a2c
1 file changed
+18
@@ -223,6 +223,24 @@ function checkPSVersion()
|
|||||||
return $upgrader->checkPSVersion();
|
return $upgrader->checkPSVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deprecated since > 1.5.4.1
|
||||||
|
* Use Translate::getAdminTranslation($string) instead
|
||||||
|
*
|
||||||
|
* @param string $string
|
||||||
|
*/
|
||||||
|
function translate($string)
|
||||||
|
{
|
||||||
|
Tools::displayAsDeprecated();
|
||||||
|
|
||||||
|
global $_LANGADM;
|
||||||
|
if (!is_array($_LANGADM))
|
||||||
|
return str_replace('"', '"', $string);
|
||||||
|
$key = md5(str_replace('\'', '\\\'', $string));
|
||||||
|
$str = (key_exists('index'.$key, $_LANGADM)) ? $_LANGADM['index'.$key] : ((key_exists('index'.$key, $_LANGADM)) ? $_LANGADM['index'.$key] : $string);
|
||||||
|
return str_replace('"', '"', stripslashes($str));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a new Tab object
|
* Returns a new Tab object
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in new issue
Block a user