You are here

public static function Drupal::languageManager in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal.php \Drupal::languageManager()
  2. 9 core/lib/Drupal.php \Drupal::languageManager()

Returns the language manager service.

Return value

\Drupal\Core\Language\LanguageManagerInterface The language manager.

172 calls to Drupal::languageManager()
AccountForm::form in core/modules/user/src/AccountForm.php
Gets the actual form array to be built.
AdminPathEntityConverterLanguageTest::testConfigUsingCurrentLanguage in core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php
Tests the translated and untranslated config entities are loaded properly.
BlockContentTypeTest::testBlockContentTypeCreation in core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php
Tests creating a block type programmatically and via a form.
BlockStorageUnitTest::createTests in core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php
Tests the creation of blocks.
ckeditor5_js_alter in core/modules/ckeditor5/ckeditor5.module
Implements hook_js_alter().

... See full list

File

core/lib/Drupal.php, line 592

Class

Drupal
Static Service Container wrapper.

Code

public static function languageManager() {
  return static::getContainer()
    ->get('language_manager');
}