<?php
if (!defined('entry') || !entry) {
    die('Not a valid page');
}
/* ===========================

  Sorbet CMS - A PHP based tumblelog CMS forked from Gelato CMS

  Sorbet CMS is a free software licensed under the GPL 3.0

  =========================== */
?>
<?php
require_once("streams.class.php");
require_once("gettext.class.php");

function initLang($lang = "en")
{
    global $l10n;

    $input = new FileReader(dirname(__FILE__).DIRECTORY_SEPARATOR."..".DIRECTORY_SEPARATOR."languages".DIRECTORY_SEPARATOR.$lang.DIRECTORY_SEPARATOR."messages.mo");
    $l10n = new gettext_reader($input);
}

function __($text)
{
    global $l10n;
    return $l10n->translate($text);
}

function T_ngettext($single, $plural, $number)
{
    global $l10n;
    return $l10n->ngettext($single, $plural, $number);
}
?>