예제 #1
0
function languagemenu()
{
    include_once 'langcodes.php';
    global $langtag2locale, $Langcode2english, $twoletters2threeletters, $content_language;
    $r = '<form action="../" method="get">' . _("Website Language: ") . '<select name="l" onchange="parent.location.href=\'../\'+l.value">' . "\n" . '  <option value="en">' . _('English') . "</option>\n";
    foreach ($langtag2locale as $lt => $loc) {
        if (strlen($lt) == 2 && isset($twoletters2threeletters[$lt])) {
            $lt2 = $twoletters2threeletters[$lt];
        } else {
            $lt2 = $lt;
        }
        $r .= '  <option value="' . $lt . '"';
        if ($lt == $content_language) {
            $r .= ' selected="selected"';
        }
        $r .= '>' . langcode2english($lt2) . "</option>\n";
    }
    return $r . '</select><input type="submit" value="!" /></form>';
}
예제 #2
0
</p>

<table summary="<?php 
echo _('Translation status for the website languages');
?>
">
 <thead>
  <tr>
    <th><?php 
echo _('Language');
?>
</th>
    <th><?php 
echo _('Status');
?>
</th>
  </tr>
 </thead>
 <tbody>
  <?php 
global $langtag2locale, $content_language, $twoletters2threeletters;
foreach ($langtag2locale as $lt => $l) {
    $l3 = array_key_exists($lt, $twoletters2threeletters) ? $twoletters2threeletters[$lt] : $lt;
    echo '<tr><td>' . _(langcode2english($l3)) . '</td><td>' . `LANG={$l}.utf8 msgfmt --statistics locale/{$l}/LC_MESSAGES/freedict.po -o /dev/null 2>&1` . '</td></tr>';
}
?>
 </tbody>
</table>

<?php 
require_once 'inc/footer.php';
예제 #3
0
}
$ds = $have_php5 ? nodelist2array($freedict_database->getElementsByTagName('dictionary')) : $fddb_docel->get_elements_by_tagname('dictionary');
usort($ds, "cmp");
$dscount = 0;
$hwsum = 0;
foreach ($ds as $d) {
    $dscount++;
    list($l1, $l2) = split('-', $d->{$get_attr}('name'));
    $status = $d->{$get_attr}('status');
    echo '<tr bgcolor="' . status2color($status) . '">';
    echo '<td>';
    $source = $d->{$get_attr}('sourceURL');
    if ($source) {
        echo '<a href="' . htmlentities($source) . '" target="_top">';
    }
    echo _(langcode2english($l1)) . ' -&gt; ' . _(langcode2english($l2));
    if ($source) {
        echo '</a>';
    }
    echo '</td>';
    $maintainer = $d->{$get_attr}('maintainerName');
    if ($maintainer == '') {
        $maintainer = '-';
    }
    echo '<td>' . $maintainer . '</td>';
    echo '<td align="right">' . $d->{$get_attr}('headwords') . '</td>';
    $hwsum += $d->{$get_attr}('headwords');
    echo '<td>' . $d->{$get_attr}('edition') . '</td>';
    echo '<td>' . $d->{$get_attr}('date') . '</td>';
    echo '<td><small>' . $status . '</small></td>';
    foreach (array('dict-tgz', 'dict-tbz2', 'evolutionary', 'bedic', 'stardict', 'rpm', 'tei', 'src') as $platform) {