<?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,