From: Janusz Dobrowolski Date: Wed, 6 Oct 2010 14:16:19 +0000 (+0000) Subject: Added helper for gettext domain switching. X-Git-Tag: v2.4.2~19^2~589 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=873c3e12c9cf244b1650d5ad04f436ec7c459540;p=fa-stable.git Added helper for gettext domain switching. --- diff --git a/includes/lang/gettext.php b/includes/lang/gettext.php index 78e7b687..3dc2e88d 100644 --- a/includes/lang/gettext.php +++ b/includes/lang/gettext.php @@ -534,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); +} ?>