示例#1
0
<?php

$page = new Page();
$page->addRssFeed('status_branch_rss.php', __('Frhed Translations Status (Stable Branch)'));
$page->addRssFeed('status_trunk_rss.php', __('Frhed Translations Status (Unstable Trunk)'));
$page->printHead(__('Translations'));
$page->printHeading(__('Translations'));
$page->printPara(__('We currently have Frhed translated into the languages listed below:'));
print "<ul>\n";
try {
    $status = new TranslationsStatus('status_trunk.xml');
    $languages = $status->getLanguagesArray();
    foreach ($languages as $language) {
        //for all languages...
        print "  <li>" . __($language) . "</li>\n";
    }
} catch (Exception $ex) {
    //If problems with translations status...
    print "  <li>" . __('English') . "</li>\n";
}
print "</ul>\n";
$page->printSubHeading(__('Status'));
$page->printPara(__('The following two pages inform you about the translations status of the stable and developer version of Frhed:'));
?>
<ul>
  <li><a href="status_branch.php"><?php 
__e('Stable Version (Branch)');
?>
</a> <?php 
$page->printRssFeedLink('status_branch_rss.php');
?>
示例#2
0
<?php

$page = new Page();
$page->addRssFeed('status_trunk_rss.php');
$page->printHead(__('Translations Status (Unstable Trunk)'));
$page->printRssHeading(__('Translations Status (Unstable Trunk)'), 'status_trunk_rss.php');
try {
    $status = new TranslationsStatus('status_trunk.xml');
    $status->svnUrl = 'http://frhed.svn.sourceforge.net/viewvc/frhed/trunk/Translations/';
    $status->printTOC();
    $status->printStatus();
    $status->printTranslators();
} catch (Exception $ex) {
    //If problems with translations status...
    print "<p>" . __('The translations status is currently not available...') . "</p>\n";
}
$page->printFoot();
<?php

header('Content-type: application/rss+xml');
try {
    $status = new TranslationsStatus('status_branch.xml');
    $status->version = 'Stable Branch';
    $status->svnUrl = 'http://frhed.svn.sourceforge.net/viewvc/frhed/branches/R1_6/Translations/';
    $status->rssLink = 'http://frhed.sourceforge.net/translations/status_branch.php';
    $status->printRSS();
} catch (Exception $ex) {
    //If problems with translations status...
    print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
    print "<rss version=\"2.0\">\n";
    print "</rss>\n";
}