From 87eaef7cc1bfe350777b1c08f3c9ed95164927d6 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Fri, 29 Jun 2007 21:30:52 +0000 Subject: [PATCH] Make dir parameter optional for sq_bindtextdomain() git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12492 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- include/languages.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/languages.php b/include/languages.php index aef1a200..a20af558 100644 --- a/include/languages.php +++ b/include/languages.php @@ -76,12 +76,16 @@ function sq_change_text_domain($domain_name, $directory='') { * * @since 1.4.10 and 1.5.1 * @param string $domain gettext domain name - * @param string $dir directory that contains all translations + * @param string $dir directory that contains all translations (OPTIONAL; + * if not specified, defaults to SquirrelMail locale + * directory) * @return string path to translation directory */ -function sq_bindtextdomain($domain,$dir) { +function sq_bindtextdomain($domain,$dir='') { global $l10n, $gettext_flags, $sm_notAlias; + if (empty($dir)) $dir = SM_PATH . 'locale/' + if ($gettext_flags==7) { // gettext extension without ngettext if (substr($dir, -1) != '/') $dir .= '/'; -- 2.25.1