From: pdontthink Date: Fri, 29 Jun 2007 21:30:52 +0000 (+0000) Subject: Make dir parameter optional for sq_bindtextdomain() X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=87eaef7cc1bfe350777b1c08f3c9ed95164927d6;p=squirrelmail.git 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 --- 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 .= '/';