changed unclosed comment tags /* on lines 315 & 316 to //
[squirrelmail.git] / functions / i18n.php
index 64c96762eee94ede491bb0641586571c9bd44fdb..238221936aef857c614a2fab3bd03ab2ee193e1b 100644 (file)
@@ -1,4 +1,4 @@
-<?
+<?php
 
 /**
  ** i18n.php
@@ -6,22 +6,23 @@
  ** This file contains variuos functions that are needed to do
  ** internationalization of SquirrelMail.
  **
- ** Internally iso-8859-1 is used as character set. Other characters
- ** are encoded using Unicode entities according to HTML 4.0.
+ ** Internally the output character set is used. Other characters are
+ ** encoded using Unicode entities according to HTML 4.0.
  **
  **/
 
    $i18n_php = true;
 
    // This array specifies the available languages.
-   $languages[0]["NAME"] = "English";
-   $languages[0]["CODE"] = "en";
-   $languages[1]["NAME"] = "Norsk";
-   $languages[1]["CODE"] = "no";
-   $languages[2]["NAME"] = "Deutcsh";
-   $languages[2]["CODE"] = "de";
-   $languages[2]["NAME"] = "Russian KOI8-R";
-   $languages[2]["CODE"] = "ru";
+   $languages["en"]["NAME"]    = "English";
+   $languages["no"]["NAME"]    = "Norsk";
+   $languages["no"]["CHARSET"] = "iso-8859-1";
+   $languages["de"]["NAME"]    = "Deutsch";
+   $languages["de"]["CHARSET"] = "iso-8859-1";
+   $languages["ru"]["NAME"]    = "Russian KOI8-R";
+   $languages["ru"]["CHARSET"] = "koi8-r";
+   $languages["pl"]["NAME"]    = "Polish";
+   $languages["pl"]["CHARSET"] = "iso-8859-2";
 
    // Decodes a string to the internal encoding from the given charset
    function charset_decode ($charset, $string) {
@@ -44,7 +45,7 @@
       } else if ($charset == "koi8-r") {
         return charset_decode_koi8r ($string);
       } else
-         return "xx$charset:$string";
+         return "$string";
    }
 
    // iso-8859-1 is the same as Latin 1 and is normally used