remove old readme
[atutor.git] / docs / include / html / languages.inc.php
1 <?php
2 /****************************************************************/
3 /* ATutor                                                                                                               */
4 /****************************************************************/
5 /* Copyright (c) 2002-2010                                      */
6 /* Inclusive Design Institute                                   */
7 /* http://atutor.ca                                                                                             */
8 /*                                                              */
9 /* This program is free software. You can redistribute it and/or*/
10 /* modify it under the terms of the GNU General Public License  */
11 /* as published by the Free Software Foundation.                                */
12 /****************************************************************/
13 if (!defined('AT_INCLUDE_PATH')) { exit; }
14
15 global $languageManager, $_my_uri;
16
17 if($languageManager->getNumLanguages() < 2){
18         return;
19 }
20 ?>
21 <div align="center" id="langdiv" style="clear: left"><br /><?php
22
23         if ($languageManager->getNumLanguages() > 5) {
24                 echo '<form method="get" action="'.htmlspecialchars($_my_uri, ENT_QUOTES).'">';
25                 echo '<label for="lang" style="display:none;">'._AT('translate_to').' </label>';
26                 $languageManager->printDropdown($_SESSION['lang'], 'lang', 'lang');
27                 echo ' <input type="submit" name="submit_language" class="button" value="'._AT('translate').'" />';
28                 echo '</form>';
29         } else {
30                 echo '<small><label for="lang">'._AT('translate_to').' </label></small>';
31                 $languageManager->printList($_SESSION['lang'], 'lang', 'lang', htmlspecialchars($_my_uri));
32         }
33 ?></div>