예제 #1
0
    }
    if (!is_dir("components/com_kunena/language/{$language}")) {
        die("Error: Unknown language '{$language}'\n\n");
    }
    echo "\nLoading {$language} language strings...\n\n";
    // Load all translations
    $translations = array();
    foreach ($files as $file => $dummy) {
        $file = preg_replace('|en-GB|', $language, $file);
        $translations += loadTranslations($file);
    }
    echo "\nSaving {$language} language strings...\n\n";
    // Save language files
    foreach ($files as $infile => $dummy) {
        $outfile = preg_replace('|en-GB|', $language, $infile);
        saveLang($infile, $outfile);
    }
}
function checkdir($dir, $filter = '/(\\.php|\\.xml|\\.js)$/')
{
    $checklist = array();
    $files = scandir($dir);
    foreach ($files as $file) {
        if ($file[0] == '.') {
            continue;
        }
        $path = "{$dir}/{$file}";
        if (is_dir($path)) {
            $checklist += checkdir($path, $filter);
        } elseif (preg_match($filter, $file)) {
            $checklist[$path] = 1;
예제 #2
0
    die;
}
session_start();
if ($_SESSION["uid"] == null) {
    echo "window.location.href ='logoff.php';";
    die;
}
include_once 'ressources/class.templates.inc';
include_once 'ressources/class.ldap.inc';
include_once 'ressources/class.users.menus.inc';
if (isset($_GET["popup"])) {
    popup();
    exit;
}
if (isset($_POST["lang"])) {
    saveLang();
    exit;
}
js();
function js()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $title = $tpl->_ENGINE_parse_body("{language}");
    $html = "YahooWin4('290','{$page}?popup=yes','{$title}')";
    echo $html;
}
function popup()
{
    $tpl = new templates();
    $page = CurrentPageName();
예제 #3
0
        } else {
            $files['site/en-GB.com_kunena.templates.ini'][$location][$key] = $location;
        }
    } elseif (preg_match('#^components/com_kunena/lib#', $location)) {
        $files['admin/en-GB.com_kunena.libraries.ini'][$location][$key] = $location;
    } else {
        $files['site/en-GB.com_kunena.ini'][$location][$key] = $location;
    }
}
echo "Loading existing language strings...\n\n";
$filter = '/^en-GB\\.com_kunena.*\\.ini$/';
$langfiles = checkdir('administrator', $filter);
$langfiles += checkdir('components', $filter);
list($translations, $filestrings) = loadTranslations(array_keys($langfiles));
foreach ($files as $filename => $fkeys) {
    saveLang($keys, $fkeys, $translations, $filestrings, $filename, $header);
}
function checkdir($dir, $filter = '/(\\.php|\\.xml|\\.js)$/')
{
    $checklist = array();
    $files = scandir($dir);
    foreach ($files as $file) {
        if ($file[0] == '.') {
            continue;
        }
        $path = "{$dir}/{$file}";
        if (is_dir($path)) {
            $checklist += checkdir($path, $filter);
        } elseif (preg_match($filter, $file)) {
            $checklist[$path] = 1;
        }