Beispiel #1
0
function qwp_tmpl_init_security(&$acls)
{
    $acls = array();
    qwp_tmpl_get_acls($acls);
    _C('acls', $acls);
    qwp_tmpl_init_nav_modules($acls);
}
Beispiel #2
0
function qwp_initialize_language()
{
    global $language, $language_set, $lang_txts, $loaded_lang;
    $loaded_lang = array();
    $lang_txts = array();
    // initialize language set
    if (!isset($language_set)) {
        $language_set = C('lang_set');
    }
    if (!$language_set) {
        $set = scandir(QWP_LANG_ROOT);
        $language_set = array();
        foreach ($set as &$name) {
            if (!is_dot_dir($name) && $name != 'main.php') {
                $language_set[$name] = true;
            }
        }
        _C('lang_set', $language_set);
    }
    if (!isset($language) || !isset($language_set[$language])) {
        $language = C('lang');
        if (!$language) {
            $language = DEFAULT_LANGUAGE;
        }
    }
}
Beispiel #3
0
function qwp_tmpl_logout()
{
    _C('u');
    _C('acls');
    _C('nav');
}
echo "\n";
echo '=> ' . _T('test_args', array('arg1' => 'AZERTY', 'arg2' => 4.657), 'fr');
echo "\n";
$indexes = array(0 => 'test_item_zero', 1 => 'test_item_one', 2 => 'test_item_two', 3 => 'test_item_multi');
for ($counter = 0; $counter < 5; $counter++) {
    echo "\n" . 'for counter=' . $counter . ' : ' . _P($indexes, $counter, null, 'fr');
}
echo "\n";
echo "\n";
echo '=> ' . _D($date, null, 'UTF-8', 'fr');
echo "\n";
echo "\n";
echo '=> ' . _N($nb, 'fr');
echo "\n";
echo "\n";
echo '=> ' . _C($nb, 'fr');
echo "\n";
echo "\n";
echo 'echo $translator->getCurrency("fr")' . "\n";
echo '=> ' . $translator->getCurrency('fr') . "\n";
echo 'echo $translator->getLanguageCode("fr")' . "\n";
echo '=> ' . $translator->getLanguageCode('fr') . "\n";
echo 'echo $translator->getLanguageName("fr","fr")' . "\n";
echo '=> ' . $translator->getLanguageName('fr', 'fr') . "\n";
echo 'echo $translator->getLanguageName("en","fr")' . "\n";
echo '=> ' . $translator->getLanguageName('en', 'fr') . "\n";
echo 'echo $translator->getCountryName("fr","fr")' . "\n";
echo '=> ' . $translator->getCountryName('fr', 'fr') . "\n";
echo 'echo $translator->getCountryName("en","fr")' . "\n";
echo '=> ' . $translator->getCountryName('en', 'fr') . "\n";
echo 'echo $translator->getLocaleScript("en", "fr")' . "\n";