However, on the registration page, the language selection dropdown is empty.
I believe the issue is caused by the following code in ucp_register.php:
Code: Select all
// Checking amount of available languages
$sql = 'SELECT lang_iso, lang_local_name
FROM ' . LANG_TABLE . '
ORDER BY lang_english_name';
$result = $db->sql_query($sql);
$lang_row = (array) $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
Later in the template variables:
Code: Select all
$template_vars = array(
...
'S_LANG_OPTIONS' => (count($lang_row) > 1) ? language_select($data['lang'], $lang_row) : '', // Here is the issue I suppose
Is this the intended behavior? If not, what would be the best way to ensure the default language is selected properly even when there's only one language installed?
Thanks!