diff --git a/admin_menu.module b/admin_menu.module
index 3c0ac9e..28f94ac 100644
--- a/admin_menu.module
+++ b/admin_menu.module
@@ -7,6 +7,7 @@
 
 use Drupal\Core\Template\Attribute;
 use Drupal\Core\Cache\CacheBackendInterface;
+use Drupal\Core\Language\Language;
 
 /**
  * Implements hook_help().
@@ -244,7 +245,7 @@ function admin_menu_page_build(&$page) {
 
   // If the client supports JavaScript and we have a cached menu for the current
   // user, only output the hash for the client-side HTTP cache callback URL.
-  $cid = 'admin_menu:' . $user->uid . ':' . session_id() . ':' . language(LANGUAGE_TYPE_INTERFACE)->langcode;
+  $cid = 'admin_menu:' . $user->uid . ':' . session_id() . ':' . language(Language::TYPE_INTERFACE)->langcode;
   if (!$complete && ($hash = admin_menu_cache_get($cid))) {
     $settings['hash'] = $hash;
     // The base path to use for cache requests depends on whether clean URLs
@@ -498,7 +499,7 @@ function admin_menu_output($complete = FALSE) {
   global $user;
 
   $cache_server_enabled = !$complete && variable_get('admin_menu_cache_server', TRUE);
-  $langcode = language(LANGUAGE_TYPE_INTERFACE)->langcode;
+  $langcode = language(Language::TYPE_INTERFACE)->langcode;
   $cid = 'admin_menu:' . $user->uid . ':' . session_id() . ':' . $langcode;
   $tags = array('admin_menu' => TRUE, 'user' => $user->uid, 'language' => $langcode);
 
