diff --git a/src/Fast404.php b/src/Fast404.php
index 8348432..e0eee04 100644
--- a/src/Fast404.php
+++ b/src/Fast404.php
@@ -104,6 +104,29 @@ class Fast404 {
       return;
     }
 
+    // Check for a language path prefix.
+    $lang_negotiation_url_info = \Drupal::config('language.negotiation')->get('url');
+    if (!empty($lang_negotiation_url_info['source']) && $lang_negotiation_url_info['source'] == 'path_prefix') {
+      // Separate the language path prefix if it exists.
+      $pos = strpos($path, '/', 1);
+      if ($pos !== FALSE) {
+        $prefix = substr($path, 1, $pos - 1);
+      }
+      else {
+        $prefix = substr($path, 1);
+      }
+      // If this string is one of the configured language prefixes, ignore it.
+      if (in_array($prefix, $lang_negotiation_url_info['prefixes'])) {
+        if ($pos !== FALSE) {
+          $path = substr($path, $pos);
+        }
+        else {
+          // This path is the front page for a language prefix.
+          return;
+        }
+      }
+    }
+
     // If we have a database connection we can use it, otherwise we might be
     // initialising it.
 
