function language_get_default_configuration

Returns the language configuration stored for an entity type and bundle.

Parameters

string $entity_type: A string representing the entity type.

string $bundle: A string representing the bundle.

Return value

array An array with the following keys:

  • langcode: the language code.
  • language_hidden: if the language element is hidden or not.
9 calls to language_get_default_configuration()

File

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

Code

function language_get_default_configuration($entity_type, $bundle) {
  $configuration = config('language.settings')
    ->get(language_get_default_configuration_settings_key($entity_type, $bundle));
  if (is_null($configuration)) {
    $configuration = array();
  }
  $configuration += array(
    'langcode' => 'site_default',
    'language_hidden' => TRUE,
  );
  return $configuration;
}