コード例 #1
0
ファイル: footer-frame.php プロジェクト: rec/radio
<?php

require_once "php/html.php";
require_once "php/messages.php";
loadTranslations("messages/%s.php");
?>

<html>
<head>
  <link href="new-style.css" rel="stylesheet" type="text/css"/>
  <script type="text/javascript" src="js/swfplayer.js"></script>
  <script type="text/javascript" src="js/swfobject.js"></script>
</head>

<body>
  <div id="footer">
    <table width="100%" height="100%">
      <tr style="vertical-align: top">
	<td style="float:left; vertical-align: top">
	  <?php 
MSG("broadcasting since");
?>
	</td>

	<td style="float:right" align="right" id="Copyright">
	  <?php 
MSG("copyright");
?>
	  <a href="mailto:tom@swirly.com" style="position:relative; top: -1px;" >Tom Swirly</a>.
	  <?php 
MSG("all rights reserved");
コード例 #2
0
// Remove incompatible file
unset($files['administrator/components/com_kunena/language/en-GB/en-GB.com_kunena.menu.ini']);
global $translations;
foreach ($languages as $language) {
    if ($language == 'en-GB') {
        continue;
    }
    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;
コード例 #3
0
ファイル: resource.php プロジェクト: peppy/pTransl
			
			echo "1";
			exit();
		case "redraw":
			$variableId = (int)$_REQUEST[id];
			$variables = loadTranslations($resourceId, $languageCode,"v.variable_id = $variableId");
			echo displayVariable($variableId, $variables[$variableId]);
			exit();
	}
	
	
}

$resource = $conn->queryRow("SELECT * FROM resources WHERE resource_id = $resourceId");

$variables = loadTranslations($resourceId, $languageCode);

function loadTranslations($resourceId, $languageCode, $condition = "")
{
	global $conn;
	global $user;

	if (strlen($condition) > 0) $condition .= " and";
	$variables = $conn->queryAllRekey("SELECT v.* FROM variables v WHERE $condition resource_id = $resourceId order by name");

	$query = "SELECT t.*, u.*, vo.vote as uservote FROM variables v JOIN translations t USING (variable_id) JOIN users u USING (user_id) LEFT JOIN votes vo ON vo.translation_id = t.translation_id AND vo.user_id = '".$user['user_id']."' WHERE $condition t.language_code = '$languageCode' AND v.resource_id = $resourceId ORDER BY t.variable_id, t.last_update";
	$translations = $conn->queryAll($query);
	foreach ($translations as $translation)
		$variables[$translation [variable_id]][translations][] = $translation;

	return $variables;
コード例 #4
0
        if (preg_match('#/blue_eagle/#', $location)) {
            $files['site/en-GB.com_kunena.tpl_blue_eagle.ini'][$location][$key] = $location;
        } 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)) {