Added (c) stuff and some formatting.
[squirrelmail.git] / functions / gettext.php
index 7f8c59624b25be143b2d167fd826470ba40b7b03..48fec079c744dfa607851734ee558ff083e359ff 100644 (file)
@@ -1,19 +1,20 @@
 <?PHP
 
-   /* Alternate to the system's built-in gettext.
-    * relies on .po files (can't read .mo easily).
-    * Uses the session for caching (speed increase)
-    * Possible use in other PHP scripts?  The only SM-specific thing is
-    *   $sm_language, I think
-    *
-    * Very special thanks to Konstantin Riabitsev for letting me use a
-    * server that didn't already have gettext on it!
-    */
-     
-   if (defined('gettext_php'))
-      return;
-   define('gettext_php', true);
-   
+   /**
+    **  gettext.php
+    **
+    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
+    **  Licensed under the GNU GPL. For full terms see the file COPYING.
+    **
+    **  Alternate to the system's built-in gettext.
+    **  relies on .po files (can't read .mo easily).
+    **  Uses the session for caching (speed increase)
+    **  Possible use in other PHP scripts?  The only SM-specific thing is
+    **    $sm_language, I think
+    **
+    ** $Id$
+    **/
+
    global $gettext_php_domain, $gettext_php_dir, $gettext_php_loaded,
       $gettext_php_translateStrings, $gettext_php_loaded_language,
       $gettext_php_short_circuit;
       $gettext_php_loaded_language = '';
       session_register('gettext_php_loaded_language');
    }
+   if (! isset($gettext_php_short_circuit)) {
+      $gettext_php_short_circuit = false;
+      session_register('gettext_php_short_circuit');
+   }
 
    function gettext_php_load_strings() {
       global $squirrelmail_language, $gettext_php_translateStrings,