language_configurable_language_insert(ConfigurableLanguageInterface $language)
Implements hook_ENTITY_TYPE_insert() for 'configurable_language'.
File
- core/modules/language/language.module, line 348
- Add language handling functionality to Drupal.
Code
function language_configurable_language_insert(ConfigurableLanguageInterface $language) { if ($language->isLocked()) { return; } // Add language to the list of language domains. $config = \Drupal::configFactory()->getEditable('language.negotiation'); $domains = $config->get('url.domains'); $domains[$language->id()] = ''; $config->set('url.domains', $domains)->save(); }
Please login to continue.