** -> *
[squirrelmail.git] / functions / i18n.php
index 77b66fe8d58c07b17b7a0b1f60543d6c7f070950..2ce457b1f144020b2dfb771ae0a6f10a29749d50 100644 (file)
@@ -1,20 +1,19 @@
 <?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);
+   /**
+    *  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$
+    */
 
    global $squirrelmail_language, $languages;
    if (! isset($squirrelmail_language)) { $squirrelmail_language = ''; }
    $languages['ca']['CHARSET'] = 'iso-8859-1';
    $languages['ca_CA']['ALIAS'] = 'ca';
 
-   $languages['cs']['NAME']    = 'Czech';
-   $languages['cs']['CHARSET'] = 'iso-8859-2';
-   $languages['cs_CZ']['ALIAS'] = 'cs';
+   /* 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.
+    */
+   $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['sv_SV']['ALIAS'] = 'sv';
    
    $languages['tr']['NAME']    = 'Turkish';
-   $languages['tr']['CHARSET'] = 'iso-8859-1';
+   $languages['tr']['CHARSET'] = 'iso-8859-9';
    $languages['tr_TR']['ALIAS'] = 'tr';
    
    $languages['tw']['NAME']    = 'Taiwan';
    
    $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']);
       }
    }