function saveSettings()
{
- static $settings = array('name', 'broughtby', 'broughtbyurl', 'email', 'timezone');
+ static $settings = array('name', 'broughtby', 'broughtbyurl',
+ 'email', 'timezone', 'language');
$values = array();
$this->clientError(_('Timezone not selected.'));
return;
}
+
+ // Validate language
+
+ if (!is_null($language) && !in_array($language, array_keys(get_nice_language_list()))) {
+ $this->clientError(sprintf(_('Unknown language "%s"'), $language));
+ }
}
}
$this->out->dropdown('timezone', _('Default timezone'),
$timezones, _('Default timezone for the site; usually UTC.'),
true, $this->value('timezone'));
+
+ $this->out->dropdown('language', _('Language'),
+ get_nice_language_list(), _('Default site language'),
+ false, $this->value('language'));
}
/**