forked from extern/egroupware
now only shows installed langs
This commit is contained in:
parent
e18b02cc39
commit
343a673c72
@ -142,23 +142,21 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php $selected[$phpgw_info["user"]["preferences"]["common"]["lang"]] = " selected"; ?>
|
||||
<td><?php echo lang("language"); ?></td>
|
||||
<td>
|
||||
<select name="settings[lang]">
|
||||
<?php
|
||||
|
||||
$lang_select[$phpgw_info["user"]["preferences"]["common"]["lang"]] = " selected";
|
||||
$phpgw->db->query("SELECT lang_id, lang_name FROM languages WHERE available = 'Yes'",__LINE__,__FILE__);
|
||||
$phpgw->db->query("select distinct lang from lang;");
|
||||
while ($phpgw->db->next_record()) {
|
||||
echo "<option value=\"" . $phpgw->db->f("lang_id") . "\"";
|
||||
if ($phpgw_info["user"]["preferences"]["common"]["lang"]) {
|
||||
if ($phpgw->db->f("lang_id") == $phpgw_info["user"]["preferences"]["common"]["lang"]) {
|
||||
echo " selected";
|
||||
$phpgw_info["installed_langs"][$phpgw->db->f("lang")] = $phpgw->db->f("lang");
|
||||
}
|
||||
} elseif ($phpgw->db->f("lang_id") == "en") {
|
||||
echo " selected";
|
||||
}
|
||||
echo ">" . $phpgw->db->f("lang_name") . "</option>";
|
||||
reset ($phpgw_info["installed_langs"]);
|
||||
while (list ($key, $value) = each ($phpgw_info["installed_langs"])) {
|
||||
$sql = "select lang_name from languages where lang_id = '".$value."';";
|
||||
$phpgw->db->query($sql);
|
||||
$phpgw->db->next_record();
|
||||
echo '<option value="'.$key.'" '.$selected[$key].'>'.$phpgw->db->f("lang_name").'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
Loading…
Reference in New Issue
Block a user