From 873c3e12c9cf244b1650d5ad04f436ec7c459540 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Wed, 6 Oct 2010 14:16:19 +0000 Subject: [PATCH] Added helper for gettext domain switching. --- includes/lang/gettext.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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); +} ?> -- 2.30.2