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