function LanguageManager::getNativeLanguages

Same name in other branches
  1. 9 core/lib/Drupal/Core/Language/LanguageManager.php \Drupal\Core\Language\LanguageManager::getNativeLanguages()
  2. 8.9.x core/lib/Drupal/Core/Language/LanguageManager.php \Drupal\Core\Language\LanguageManager::getNativeLanguages()
  3. 10 core/lib/Drupal/Core/Language/LanguageManager.php \Drupal\Core\Language\LanguageManager::getNativeLanguages()

Overrides LanguageManagerInterface::getNativeLanguages

1 method overrides LanguageManager::getNativeLanguages()
ConfigurableLanguageManager::getNativeLanguages in core/modules/language/src/ConfigurableLanguageManager.php
Returns a list of languages set up on the site in their native form.

File

core/lib/Drupal/Core/Language/LanguageManager.php, line 147

Class

LanguageManager
Class responsible for providing language support on language-unaware sites.

Namespace

Drupal\Core\Language

Code

public function getNativeLanguages() {
    // In a language unaware site we don't have translated languages.
    return $this->getLanguages();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.