diff --git a/admin-dev/functions.php b/admin-dev/functions.php index dd5dea623..62db43b39 100644 --- a/admin-dev/functions.php +++ b/admin-dev/functions.php @@ -223,6 +223,24 @@ function 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 *