use language-dependant URLs for user documentation URL

This commit is contained in:
mlutfy 2009-02-27 18:37:29 +00:00
parent ced52717dd
commit e5066ee7b1
1 changed files with 16 additions and 2 deletions

View File

@ -27,6 +27,20 @@
Purpose of file:
----------------------------------------------------------------------
*/
?>
<dd><a href="http://alternc.org/wiki/Documentation/Utilisateur" target="help"><?php __("Online help"); ?></a></dd>
global $lang;
$doc_lang = substr($lang, 0, 2); // ex: get "fr" only, not "fr_CA"
$doc_url = 'http://alternc.org/wiki/Documentation/En/User';
switch ($doc_lang) {
case 'fr':
$doc_url = 'http://alternc.org/wiki/Documentation/Fr/Utilisateur';
break;
case 'es':
$doc_url = 'http://alternc.org/wiki/Documentation/Es';
break;
}
echo '<dd><a href="' . $doc_url . '" target="help">' . _("Online help") . '</a></dd>';