summaryrefslogtreecommitdiff
path: root/modules/locale/locale.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2011-05-28 09:31:58 -0400
committerDries Buytaert <dries@buytaert.net>2011-05-28 09:31:58 -0400
commit1e1c9b71fb7c66be87778ef423238a94a3fa4cd3 (patch)
tree20f60a69f94a1446e199f6768175dc1c01606ec7 /modules/locale/locale.module
parent7174b01bdac3fa7495a1a9b4f6139dfbcdfbae7c (diff)
parentfad397b1f131fe10674d29bd4d49ba404c1cd070 (diff)
downloadbrdo-1e1c9b71fb7c66be87778ef423238a94a3fa4cd3.tar.gz
brdo-1e1c9b71fb7c66be87778ef423238a94a3fa4cd3.tar.bz2
Merge branch '7.x' of git.drupal.org:project/drupal into 7.x
Diffstat (limited to 'modules/locale/locale.module')
-rw-r--r--modules/locale/locale.module20
1 files changed, 19 insertions, 1 deletions
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index c1cdd434b..07884614a 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -513,6 +513,8 @@ function locale_language_types_info() {
'description' => t('Order of language detection methods for user interface text. If a translation of user interface text is available in the detected language, it will be displayed.'),
),
LANGUAGE_TYPE_CONTENT => array(
+ 'name' => t('Content'),
+ 'description' => t('Order of language detection methods for content. If a version of content is available in the detected language, it will be displayed.'),
'fixed' => array(LOCALE_LANGUAGE_NEGOTIATION_INTERFACE),
),
LANGUAGE_TYPE_URL => array(
@@ -593,6 +595,22 @@ function locale_language_negotiation_info() {
return $providers;
}
+/**
+ * Implements hook_modules_enabled().
+ */
+function locale_modules_enabled($modules) {
+ include_once DRUPAL_ROOT . '/includes/language.inc';
+ language_types_set();
+ language_negotiation_purge();
+}
+
+/**
+ * Implements hook_modules_disabled().
+ */
+function locale_modules_disabled($modules) {
+ locale_modules_enabled($modules);
+}
+
// ---------------------------------------------------------------------------------
// Locale core functionality
@@ -928,7 +946,7 @@ function locale_block_info() {
include_once DRUPAL_ROOT . '/includes/language.inc';
$block = array();
$info = language_types_info();
- foreach (language_types_configurable() as $type) {
+ foreach (language_types_configurable(FALSE) as $type) {
$block[$type] = array(
'info' => t('Language switcher (@type)', array('@type' => $info[$type]['name'])),
// Not worth caching.