function language_save_default_configuration

Saves a language configuration that is attached to an entity type and bundle.

Parameters

string $entity_type: A string representing the entity type.

string $bundle: A string representing the bundle.

array $values: An array holding the values to be saved having the following keys:

  • langcode: the language code.
  • language_hidden: if the language element should be hidden or not.
4 calls to language_save_default_configuration()

File

drupal/core/modules/language/language.module, line 334
Add language handling functionality to Drupal.

Code

function language_save_default_configuration($entity_type, $bundle, $values = array()) {
  config('language.settings')
    ->set(language_get_default_configuration_settings_key($entity_type, $bundle), array(
    'langcode' => $values['langcode'],
    'language_hidden' => $values['language_hidden'],
  ))
    ->save();
}