From: philippe_mingo Date: Wed, 26 Sep 2001 14:26:52 +0000 (+0000) Subject: This fixes the plugin translation problem. Please check. X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=6e1fbb5617538d3cf6c0aa260e60d01928efbb4f This fixes the plugin translation problem. Please check. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1528 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/i18n.php b/functions/i18n.php index ca477c37..6ee96e28 100644 --- a/functions/i18n.php +++ b/functions/i18n.php @@ -307,7 +307,7 @@ // Only do the slow convert if there are 8-bit characters if (! ereg("[\200-\377]", $string)) return $string; - + // NO-BREAK SPACE $string = str_replace("\240", ' ', $string); // LATIN CAPITAL LETTER A WITH OGONEK @@ -510,11 +510,11 @@ if (strtolower($default_charset) == 'iso-8859-7') return $string; - + // Only do the slow convert if there are 8-bit characters if (!ereg("[\200-\377]", $string)) return $string; - + // Some diverse characters in the beginning $string = str_replace("\240", ' ', $string); $string = str_replace("\241", '‘', $string); @@ -550,7 +550,7 @@ // These are Unicode 900-902 while (ereg("([\270-\272])", $string, $res)) { $replace = '&#' . (ord($res[1])+720) . ";"; - $string = str_replace($res[1], $replace, $string); + $string = str_replace($res[1], $replace, $string); } // 11/11 (0xBB) Right angle quotation mark is the same as in @@ -560,7 +560,7 @@ // And now the rest of the charset while (ereg("([\274-\376])", $string, $res)) { $replace = '&#' . (ord($res[1])+720) . ';'; - $string = str_replace($res[1], $replace, $string); + $string = str_replace($res[1], $replace, $string); } return $string; @@ -635,7 +635,7 @@ if ($default_charset == 'koi8-r') return $string; - + // Convert to Unicode HTML entities. // This code is rather ineffective. $string = str_replace("\200", '─', $string); @@ -803,12 +803,11 @@ // Set up the language to be output // if $do_search is true, then scan the browser information // for a possible language that we know - function set_up_language($sm_language, $do_search = false) - { + function set_up_language($sm_language, $do_search = false) { static $SetupAlready = 0; global $HTTP_ACCEPT_LANGUAGE, $use_gettext, $languages, $squirrelmail_language, $squirrelmail_default_language, - $sm_notAlias; + $sm_notAlias; if ($SetupAlready) return; @@ -820,15 +819,15 @@ if ($do_search && ! $sm_language && isset($HTTP_ACCEPT_LANGUAGE)) { $sm_language = substr($HTTP_ACCEPT_LANGUAGE, 0, 2); } - if (! $sm_language && isset($squirrelmail_default_language)) + if (!$sm_language && isset($squirrelmail_default_language)) $sm_language = $squirrelmail_default_language; $sm_notAlias = $sm_language; while (isset($languages[$sm_notAlias]['ALIAS'])) $sm_notAlias = $languages[$sm_notAlias]['ALIAS']; if (isset($sm_language) && $use_gettext && - $squirrelmail_language != '' && - isset($languages[$sm_notAlias]['CHARSET'])) { + $sm_language != '' && + isset($languages[$sm_notAlias]['CHARSET'])) { if ((ini_get('safe_mode') == FALSE) && (getenv('LC_ALL') != $sm_language)) { putenv('LC_ALL=' . $sm_notAlias); }