diff options
Diffstat (limited to 'core/includes/common.inc')
-rw-r--r-- | core/includes/common.inc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/includes/common.inc b/core/includes/common.inc index 9d03679746c4..84e5edb9fb36 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -4531,11 +4531,12 @@ function drupal_render_cid_parts($granularity = NULL) { global $theme, $base_root, $user; $cid_parts[] = $theme; - // If Locale is enabled but we have only one language we do not need it as cid - // part. - if (language_multilingual()) { - foreach (language_types_get_configurable() as $language_type) { - $cid_parts[] = language($language_type)->id; + + // If we have only one language enabled we do not need it as cid part. + $language_manager = \Drupal::languageManager(); + if ($language_manager->isMultilingual()) { + foreach ($language_manager->getLanguageTypes() as $type) { + $cid_parts[] = $language_manager->getCurrentLanguage($type)->id; } } |