示例#1
0
/**
 * restore OLDLOCALE
 */
function restoreOldLocale($category = LC_ALL)
{
    global $OLDLOCALE, $NEWLOCALE;
    $NEWLOCALE = null;
    setCustomLocale($OLDLOCALE, $category);
}
示例#2
0
/**
 * Global Language Data
 *
 * @global  (array) $i18n i18n token keyed translation array
 * @global  (str) $LANG  IETF langcode (w/underscore delim) [tag]_[subtag]
 */
global $i18n, $LANG;
// load language
$LANG = getDefaultLang();
// set global language from config heirarchy
i18n_merge(null);
// load $LANG file into $i18n
i18n_mergeDefault();
// load GSDEFAULTLANG or GSMERGELANG lang into $i18n to override ugly missing {} tokens if set
//set php locale
setCustomLocale(getLocaleConfig());
/**
 * Globals for salt and authentication data
 *
 * @global (obj) $dataa,       authorization xml raw obj from GSDATAOTHERPATH.GSAUTHFILE
 * @global (str) $SALT,        salt from gsconfig else authorization file
 * @global (str) $SESSIONHASH  used for stateless session confirmation, or as non-expiring nonce for certain operations
 */
global $dataa, $SALT, $SESSIONHASH;
// grab authorization and security data fatal fail if salt is not set
$SALT = getDefaultSalt();
if (!isset($SALT) && $SITEURL != '' && notInInstall()) {
    die(i18n_r('KILL_CANT_CONTINUE') . "<br/>" . sprintf(i18n_r('NOT_SET'), 'SALT'));
}
$SESSIONHASH = sha1($SALT . $SITENAME);
/**