Skip to content
Snippets Groups Projects
  • Thane de Loth's avatar
    Adopt translation work from Thane de Loth · 7042e6c8
    Thane de Loth authored
    Multilanguage Support via gettext
    
    - added gettext encapsulations to all texts i thought necessary
    - added fallback function for the case that the gettext extension isn't loaded
    - added browser language detection
    - added gettext to the list of optional extensions in setup
    - rewritten some of the texts to use sprintf instead of appending strings
    - added german translation file
    - removed mark_overdue-confirm from cannedresponses.inc.php
    
    extend multi language support and a fex fixes
    
    - Better detection of translation files
    - Added functionality to redirect language codes (see redirecting
    language codes)
    - Ticket Status can be translated
    - The Datepicker can be translated
    - Extended functionality of 'testlang.php' to show what language code is
    used to translate
    
    Forgotten to apply a patch from RC5 to RC6
    
    - Forgotten to change $var to $vars in line 380 of class.mailfetch.php
    - Removed unneeded comment
    
    Added php_gettext as primary translation engine
    
    - Added php_gettext support (thanks to Danilo Segan and Steven
    Armstrong)
    - php_gettext is now the primary translation engine
    - Extended language detection functionality
    
    Add error/misconfiguration checks and fix undefined variables
    7042e6c8
main.inc.php 1.37 KiB
<?php
/*********************************************************************
main.inc.php

Master include file which must be included at the start of every file.
The brain of the whole sytem. Don't monkey with it.

Peter Rotich <peter@osticket.com>
Copyright (c)  2006-2013 osTicket
http://www.osticket.com

Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details.

vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/

#Disable direct access.
if(isset($_SERVER['SCRIPT_NAME'])
        && !strcasecmp(basename($_SERVER['SCRIPT_NAME']),basename(__FILE__)))
    die('kwaheri rafiki!');

require('bootstrap.php');
Bootstrap::loadConfig();
Bootstrap::defineTables(TABLE_PREFIX);
Bootstrap::i18n_prep();
Bootstrap::loadCode();
Bootstrap::connect();

if(!($ost=osTicket::start()) || !($cfg = $ost->getConfig()))
Bootstrap::croak(__('Unable to load config info from DB. Get tech support.'));

//Init
$session = $ost->getSession();

//System defaults we might want to make global//
#pagenation default - user can override it!
define('DEFAULT_PAGE_LIMIT', $cfg->getPageSize()?$cfg->getPageSize():25);

#Cleanup magic quotes crap.
if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
$_POST=Format::strip_slashes($_POST);
$_GET=Format::strip_slashes($_GET);
$_REQUEST=Format::strip_slashes($_REQUEST);
}
?>