Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LocaleHooks.php

function LocaleHooks::configurableLanguageUpdate

Implements hook_ENTITY_TYPE_update() for 'configurable_language'.

File

core/modules/locale/src/Hook/LocaleHooks.php, line 127

Class

LocaleHooks
Hook implementations for locale.

Namespace

Drupal\locale\Hook

Code

public function configurableLanguageUpdate(ConfigurableLanguageInterface $language) {
    // @todo move these two cache clears out. See
    //   https://www.drupal.org/node/1293252.
    // Changing the language settings impacts the interface: clear render cache.
    \Drupal::cache('render')->deleteAll();
    // Force JavaScript translation file re-creation for the modified language.
    _locale_invalidate_js($language->id());
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal