diff --git a/core/modules/language/src/LanguageNegotiatorInterface.php b/core/modules/language/src/LanguageNegotiatorInterface.php
index 5c999c7f8b85a98cd9ddef4ac859d37d45bdcdf3..2702c8767ab06e52991f3dc726c8380e8b6fd536 100644
--- a/core/modules/language/src/LanguageNegotiatorInterface.php
+++ b/core/modules/language/src/LanguageNegotiatorInterface.php
@@ -76,11 +76,11 @@
  * }
  *
  * class MyLanguageNegotiationUrl extends LanguageNegotiationUrl {
- *   public function getCurrentLanguage(Request $request = NULL) {
+ *   public function getLangcode(Request $request = NULL) {
  *     if ($request) {
  *       // Use the original URL language negotiation method to get a valid
  *       // language code.
- *       $langcode = parent::getCurrentLanguage($request);
+ *       $langcode = parent::getLangcode($request);
  *
  *       // If we are on an administrative path, override with the default
  *       language.