X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Flang%2Fgettext.php;h=3dc2e88df711bbbc0a2870f45dcf2ef9b40aece0;hb=e94d9f21b624d215439f30b43383c641bbe51dd7;hp=16768d677df3041406fd406fc8c22688d7e1f1df;hpb=cdea200a3f1f1c3ebb65f9afae864bf8cde43c6a;p=fa-stable.git diff --git a/includes/lang/gettext.php b/includes/lang/gettext.php index 16768d67..3dc2e88d 100644 --- a/includes/lang/gettext.php +++ b/includes/lang/gettext.php @@ -127,6 +127,8 @@ class gettext_native_support { if ($path === false) $path = "./locale"; + if ($domain == "") + $domain = "?"; if ($version) { // To avoid need for apache server restart after change of *.mo file // we have to include file version as part of filename. @@ -532,9 +534,14 @@ class gettext_php_support_compiler } } -/** -* get_text related error. +/* + Set current gettext domain path */ -//class GetText_Error extends PEAR_Error {} +function set_ext_domain($path='') { + global $path_to_root; + $_SESSION['get_text']->add_domain($_SESSION['language']->code, + $path_to_root . ($path ? '/' : '') .$path.'/lang', + $path ? '' : $_SESSION['language']->version); +} ?>