2010-10-19 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_db.php: added hook for "user translation" in function
	"__".
	
	Pending task: #3057674



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3423 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-10-19 12:23:05 +00:00
parent a459de188f
commit 7c3ed62967
2 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2010-10-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_db.php: added hook for "user translation" in function
"__".
Pending task: #3057674
2010-10-19 Sergio Martin <sergio.martin@artica.es>
* godmode/massive/massive_edit_modules.php: Fixed a jquery typo

View File

@ -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;
}