From: tokul Date: Sun, 11 May 2003 10:08:12 +0000 (+0000) Subject: Added bind_textdomain_charset function. Allows to use non default X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7928848f73a405e10c813a4ea0161372a02b6c5b;p=squirrelmail.git Added bind_textdomain_charset function. Allows to use non default charset for gettext enabled php. For example ru_RU locale in ISO8859-5 and SquirrelMail ru_RU translation done in koi8-r or cp1251. Works only with php 4.2+, but squirrelmail can function without it. Thanks to Viktor S. Grishchenko and Grisha Mokhin git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4860 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/i18n.php b/functions/i18n.php index 41492494..e0da7dae 100644 --- a/functions/i18n.php +++ b/functions/i18n.php @@ -1142,6 +1142,9 @@ function set_up_language($sm_language, $do_search = false) { isset($languages[$sm_notAlias]['CHARSET']) ) { bindtextdomain( 'squirrelmail', SM_PATH . 'locale/' ); textdomain( 'squirrelmail' ); + if (function_exists('bind_textdomain_codeset')) { + bind_textdomain_codeset ("squirrelmail", $languages[$sm_notAlias]['CHARSET'] ); + } if ( !ini_get('safe_mode') && getenv( 'LC_ALL' ) != $sm_notAlias ) { putenv( "LC_ALL=$sm_notAlias" );