Added All messages display
[squirrelmail.git] / functions / i18n.php
index 2ce053dc8711d911a6f2f1440282f2cbfd75c1c5..f205968f0c226d82b279fe25824f508d8b810477 100644 (file)
@@ -1,23 +1,38 @@
 <?php
 
 /**
- ** i18n.php
- ** 
- ** 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.
- **
- ** $Id$
- **/
-
-   if (defined ('i18n_php'))
-      return; 
-   define ('i18n_php', true);
-
-   global $squirrelmail_language, $languages;
-   if (! isset($squirrelmail_language)) { $squirrelmail_language = ''; }
+ * i18n.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development 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.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the global definition below.                         ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+global $squirrelmail_language, $languages;
+if (! isset($squirrelmail_language)) { $squirrelmail_language = ''; }
 
    // This array specifies the available languages.
    $languages['ca']['NAME']    = 'Catalan';
 
    /* PLEASE DON'T TOUCH!!!
     * Correct locale name, which should be set by setlocale and/or putenv('LC_ALL='...)
-       * is 'cs_CZ' and NOT 'cs', this applies to all locale names, look into docs, if you
-       * don't believe me.  Ondrej Sury, czech and slovak translator.
-       */
+    * is 'cs_CZ' and NOT 'cs', this applies to all locale names, look into docs, if you
+    * don't believe me.  Ondrej Sury, czech and slovak translator.
+    */
    $languages['cs_CZ']['NAME']    = 'Czech';
    $languages['cs_CZ']['CHARSET'] = 'iso-8859-2';
+   $languages['cs']['ALIAS']      = 'cs_CZ';
+   $languages['cz']['ALIAS']      = 'cs_CZ'; // set up by some ancient versions of IE
    
    $languages['da']['NAME']    = 'Danish';
    $languages['da']['CHARSET'] = 'iso-8859-1';
    
    $languages['sk_SK']['NAME']     = 'Slovak';
    $languages['sk_SK']['CHARSET']  = 'iso-8859-2';
+   $languages['sk']['ALIAS']       = 'sk_SK';
    
    $languages['ro']['NAME']    = 'Romanian';
    $languages['ro']['CHARSET'] = 'iso-8859-2';
    $languages['lt']['CHARSET'] = 'iso-8859-13';
    $languages['lt_LT']['ALIAS'] = 'lt';
 
+   $languages['sl']['NAME']    = 'Slovenian';
+   $languages['sl']['CHARSET'] = 'iso-8859-2';
+
+   $languages['bg']['NAME']    = 'Bulgarian';
+   $languages['bg']['CHARSET'] = 'iso-8859-1';
+
    // Decodes a string to the internal encoding from the given charset
    function charset_decode ($charset, $string) {
       global $debug_mime;
          setlocale('LC_ALL', $sm_notAlias);
          bindtextdomain('squirrelmail', '../locale/');
          textdomain('squirrelmail');
-         header ('Content-Type: text/html; charset=' . $languages[$sm_language]['CHARSET']);
+         header ('Content-Type: text/html; charset=' . $languages[$sm_notAlias]['CHARSET']);
       }
    }
 
      if ($my_charset) $default_charset=$my_charset;
    }
 
-?>
\ No newline at end of file
+?>