[-] BO : fixed #PSFV-727 (issue #4)

This commit is contained in:
lLefevre
2012-04-05 10:06:17 +00:00
parent 9663b86ee2
commit 336c0f4d7f
6 changed files with 3820 additions and 4195 deletions
+10 -1
View File
@@ -39,7 +39,7 @@ class TranslateCore
* @param bool $htmlentities
* @return string
*/
public static function getAdminTranslation($string, $class = 'AdminTab', $addslashes = false, $htmlentities = true)
public static function getAdminTranslation($string, $class = 'AdminTab', $addslashes = false, $htmlentities = true, $sprintf = false)
{
static $modules_tabs = null;
@@ -73,6 +73,15 @@ class TranslateCore
$str = Translate::getGenericAdminTranslation($string, $key, $_LANGADM);
$str = $htmlentities ? htmlentities($str, ENT_QUOTES, 'utf-8') : $str;
if ($sprintf)
{
if (!is_array($sprintf))
$sprintf = array($sprintf);
$str = vsprintf($str, $sprintf);
}
return str_replace('"', '"', ($addslashes ? addslashes($str) : stripslashes($str)));
}