If the user hasn't selected there langague preference, it will now pre-select english

This commit is contained in:
jengo 2000-11-18 00:17:17 +00:00
parent c92f0fd57b
commit f63c9f36fa

View File

@ -97,21 +97,24 @@
<td>
<select name="lang">
<?php
$lang_select[$phpgw_info["user"]["preferences"]["common"]["lang"]] = " selected";
$strSql = "SELECT lang_id, lang_name FROM languages WHERE available = 'Yes'";
$phpgw->db->query($strSql);
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";
}
} elseif ($phpgw->db->f("lang_id") == "EN") {
echo " selected";
}
echo ">" . $phpgw->db->f("lang_name") . "</option>";
}
?>
if (! $phpgw_info["user"]["preferences"]["common"]["lang"]) {
$phpgw_info["user"]["preferences"]["common"]["lang"] = "en";
}
$lang_select[$phpgw_info["user"]["preferences"]["common"]["lang"]] = " selected";
$strSql = "SELECT lang_id, lang_name FROM languages WHERE available = 'Yes'";
$phpgw->db->query($strSql);
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";
}
} elseif ($phpgw->db->f("lang_id") == "EN") {
echo " selected";
}
echo ">" . $phpgw->db->f("lang_name") . "</option>";
}
?>
</select>
</td>
</tr>