diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 2f8c5de0bc..771709fc0b 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2010-10-19 Miguel de Dios + + * include/functions_db.php: added hook for "user translation" in function + "__". + + Pending task: #3057674 + 2010-10-19 Sergio Martin * godmode/massive/massive_edit_modules.php: Fixed a jquery typo diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index a377398f80..cdd24a9d15 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -2977,6 +2977,24 @@ echo __('Hello, %s!', $user); function __ ($string /*, variable arguments */) { global $l10n; + $extensions = get_extensions(); + + global $config; + + if ($config['enterprise_installed']) { + if (isset($config['translate_string_extension_installed']) && $config['translate_string_extension_installed'] == 1) { + if (array_key_exists('translate_string.php', $extensions)) { + enterprise_include_once('extensions/translate_string/functions.php'); + + $tranlateString = get_defined_translation($string); + + if ($tranlateString !== false) { + return $tranlateString; + } + } + } + } + if ($string == '') { return $string; }