Adding a comment with an explanation for translators.
[squirrelmail.git] / include / languages.php
index 100a191b525325a3e91180f4c0d8f90a52c4756c..cbc169916275e88c73a4465ece2aacb938c4395e 100644 (file)
@@ -14,7 +14,7 @@
  * existing PHP installation and implements fallback functions when required
  * functions are not available. Scripts in functions/ directory should not
  * setup anything when they are loaded.
- * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @copyright © 1999-2009 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -340,10 +340,12 @@ function charset_convert($in_charset,$string,$out_charset,$htmlencode=true) {
  * @return string $charset Adjusted name of charset
  */
 function fixcharset($charset) {
-    /* remove minus and characters that might be used in paths from charset
+
+    /* Remove minus and characters that might be used in paths from charset
      * name in order to be able to use it in function names and include calls.
+     * Also make sure it's in lower case (ala "UTF" --> "utf")
      */
-    $charset=preg_replace("/[-:.\/\\\]/",'_',$charset);
+    $charset=preg_replace("/[-:.\/\\\]/",'_', strtolower($charset));
 
     // OE ks_c_5601_1987 > cp949
     $charset=str_replace('ks_c_5601_1987','cp949',$charset);
@@ -1051,7 +1053,7 @@ if (! sqgetGlobalVar('squirrelmail_language',$squirrelmail_language,SQ_COOKIE))
  *  ALTNAME   - Native translation name. Any 8bit symbols must be html encoded.
  *  LOCALE    - Full locale name (in xx_XX.charset format). It can use array with more than one locale name since 1.4.5 and 1.5.1
  *  DIR       - Text direction. Used to define Right-to-Left languages. Possible values 'rtl' or 'ltr'. If undefined - defaults to 'ltr'
- *  XTRA_CODE - translation uses special functions. See doc/i18n.txt
+ *  XTRA_CODE - translation uses special functions. See http://www.squirrelmail.org/docs/devel/devel-3.html
  *
  * Each 'language' definition requires NAME+CHARSET or ALIAS variables.
  *