diff --git a/core/lib/Drupal/Core/Session/AccountInterface.php b/core/lib/Drupal/Core/Session/AccountInterface.php index ba3ed9378cef417d7e9641bd33802a73a6d65eaa..57f6f1d697f7268bd9d2a716f323fa9c6770c6cf 100644 --- a/core/lib/Drupal/Core/Session/AccountInterface.php +++ b/core/lib/Drupal/Core/Session/AccountInterface.php @@ -76,10 +76,12 @@ public function isAnonymous(); * language if the user has no language preference. * * @return string - * The language code that is preferred by the account. If the preferred - * language is not set or is a language not configured anymore on the site, - * the site default is returned or an empty string is returned (if - * $fallback_to_default is FALSE). + * Returned language code depends upon following: + * - The user preferred language code is returned if set in the account. + * - If the user has no preferred language and $fallback_to_default is TRUE + * then the site default language code is returned. + * - If the user has no preferred language and $fallback_to_default is FALSE + * then empty string is returned. */ public function getPreferredLangcode($fallback_to_default = TRUE);