projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
restoring globalization of text alignment vars.
[squirrelmail.git]
/
functions
/
i18n.php
diff --git
a/functions/i18n.php
b/functions/i18n.php
index b6b3a942f1305ee74ad3ea8fa6c024d2ee25a3c4..a56f4f426f07e10ea7ce185a8876b85159178b09 100644
(file)
--- a/
functions/i18n.php
+++ b/
functions/i18n.php
@@
-1,16
+1,16
@@
<?php
<?php
+
/**
* SquirrelMail internationalization functions
*
/**
* SquirrelMail internationalization functions
*
- * Copyright (c) 1999-2005 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
* This file contains variuos functions that are needed to do
* internationalization of SquirrelMail.
*
* Internally the output character set is used. Other characters are
* encoded using Unicode entities according to HTML 4.0.
*
* This file contains variuos functions that are needed to do
* internationalization of SquirrelMail.
*
* Internally the output character set is used. Other characters are
* encoded using Unicode entities according to HTML 4.0.
*
+ * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
* @subpackage i18n
* @version $Id$
* @package squirrelmail
* @subpackage i18n
@@
-261,6
+261,13
@@
function fixcharset($charset) {
*/
$charset=preg_replace("/[-:.\/\\\]/",'_',$charset);
*/
$charset=preg_replace("/[-:.\/\\\]/",'_',$charset);
+ // OE ks_c_5601_1987 > cp949
+ $charset=str_replace('ks_c_5601_1987','cp949',$charset);
+ // Moz x-euc-tw > euc-tw
+ $charset=str_replace('x_euc','euc',$charset);
+ // Moz x-windows-949 > cp949
+ $charset=str_replace('x_windows_','cp',$charset);
+
// windows-125x and cp125x charsets
$charset=str_replace('windows_','cp',$charset);
// windows-125x and cp125x charsets
$charset=str_replace('windows_','cp',$charset);
@@
-408,8
+415,13
@@
function set_up_language($sm_language, $do_search = false, $default = false) {
// Many functions expect English conversion rules.
if ($sm_notAlias=='tr_TR') setlocale(LC_CTYPE,'C');
// Many functions expect English conversion rules.
if ($sm_notAlias=='tr_TR') setlocale(LC_CTYPE,'C');
- // Set text direction/alignment variables
- // These don't appear to be used... are they safe to remove?
+ /**
+ * Set text direction/alignment variables
+ * When language environment is setup, scripts can use these globals
+ * without accessing $languages directly and making checks for optional
+ * array key.
+ */
+ global $text_direction, $left_align, $right_align;
if (isset($languages[$sm_notAlias]['DIR']) &&
$languages[$sm_notAlias]['DIR'] == 'rtl') {
/**
if (isset($languages[$sm_notAlias]['DIR']) &&
$languages[$sm_notAlias]['DIR'] == 'rtl') {
/**