Skip to content

Commit

Permalink
MDL-14743 offer a link to the English help file. Merged from 1.9 stable
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrd8mz committed Mar 2, 2009
1 parent e05c43f commit 9dc1fb4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
22 changes: 21 additions & 1 deletion help.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,27 @@

// End of page.
close_window_button();
echo '<p class="helpindex"><a href="help.php?file=index.html">'. get_string('helpindex') .'</a></p>';
echo '<p class="helpindex"><a href="help.php?file=index.html">'. get_string('helpindex') .'</a>';

// Offer a link to the alternative help file language
if (($helpfound) and (((current_language() != 'en_utf8') and $lang != 'en_utf8') or ($forcelang === 'en_utf8'))) {
$linklang = "{$CFG->wwwroot}/help.php?";
$linklang .= !empty($module) ? "module=$module&amp;" : '';
$linklang .= !empty($file) ? "file=$file&amp;" : '';
$linklang .= !empty($skiplocal) ? "skiplocal=$skiplocal&amp;" : '';

if (empty($forcelang) or $forcelang === current_language()) {
$nextlang = 'en_utf8';
$nextlangname = 'English';
} else {
$nextlang = current_language();
$nextlangname = get_string('thislanguage');
}

$linklang .= "forcelang=$nextlang";
echo "<br /><a href=\"$linklang\">" . get_string('showthishelpinlanguage', 'moodle', $nextlangname) . '</a>';
}
echo '</p>';

$CFG->docroot = ''; // We don't want a doc link here
print_footer('none');
Expand Down
1 change: 1 addition & 0 deletions lang/en_utf8/moodle.php
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,7 @@
$string['showreports'] = 'Show activity reports';
$string['showsettings'] = 'Show settings';
$string['showtheselogs'] = 'Show these logs';
$string['showthishelpinlanguage'] = 'Show this help in language: $a';
$string['showtopicfromothers'] = 'Show topic from others';
$string['showweekfromothers'] = 'Show week from others';
$string['since'] = 'Since';
Expand Down

0 comments on commit 9dc1fb4

Please sign in to comment.