summaryrefslogtreecommitdiff
path: root/includes/bootstrap.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r--includes/bootstrap.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 247c90efd..21e9a6d4b 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -2376,6 +2376,12 @@ function language_list($field = 'language') {
if (!isset($languages)) {
if (drupal_multilingual() || module_exists('locale')) {
$languages['language'] = db_query('SELECT * FROM {languages} ORDER BY weight ASC, name ASC')->fetchAllAssoc('language');
+ // Users cannot uninstall the native English language. However, we allow
+ // it to be hidden from the installed languages. Therefore, at least one
+ // other language must be enabled then.
+ if (!$languages['language']['en']->enabled && !variable_get('language_native_enabled', TRUE)) {
+ unset($languages['language']['en']);
+ }
}
else {
// No locale module, so use the default language only.