From: Tomas K. <to...@us...> - 2003-11-08 08:31:52
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory sc8-pr-cvs1:/tmp/cvs-serv19078 Modified Files: i18n.php Log Message: Porting some Japanese fixes from Masato patches. http://www.yamaai-tech.com/~masato/Download/ Index: i18n.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/i18n.php,v retrieving revision 1.160 retrieving revision 1.161 diff -u -w -r1.160 -r1.161 --- i18n.php 29 Oct 2003 12:17:36 -0000 1.160 +++ i18n.php 8 Nov 2003 08:31:44 -0000 1.161 @@ -306,8 +306,12 @@ bindtextdomain( 'squirrelmail', SM_PATH . 'locale/' ); textdomain( 'squirrelmail' ); if (function_exists('bind_textdomain_codeset')) { + if ($sm_notAlias == 'ja_JP') { + bind_textdomain_codeset ("squirrelmail", 'EUC-JP'); + } else { bind_textdomain_codeset ("squirrelmail", $languages[$sm_notAlias]['CHARSET'] ); } + } if (isset($languages[$sm_notAlias]['LOCALE'])){ $longlocale=$languages[$sm_notAlias]['LOCALE']; } else { @@ -321,10 +325,13 @@ } setlocale(LC_ALL, $longlocale); $squirrelmail_language = $sm_notAlias; - if ($squirrelmail_language == 'ja_JP' && function_exists('mb_detect_encoding') ) { + if ($squirrelmail_language == 'ja_JP') { header ('Content-Type: text/html; charset=EUC-JP'); if (!function_exists('mb_internal_encoding')) { echo _("You need to have php4 installed with the multibyte string function enabled (using configure option --enable-mbstring)."); + // Revert to English link has to be added. + // stop further execution in order not to get php errors on mb_internal_encoding(). + return; } if (function_exists('mb_language')) { mb_language('Japanese'); |