mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 09:53:20 +01:00
If the user hasn't selected there langague preference, it will now pre-select english
This commit is contained in:
parent
c92f0fd57b
commit
f63c9f36fa
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user