function hook_language_types_info

Define language types.

Return value

An associative array of language type definitions. The keys are the identifiers, which are also used as names for global variables representing the types in the bootstrap phase. The values are associative arrays that may contain the following elements:

  • name: The human-readable language type identifier.
  • description: A description of the language type.
  • fixed: A fixed array of language negotiation method identifiers to use to initialize this language. Defining this key makes the language type non-configurable, so it will always use the specified methods in the given priority order. Omit to make the language type configurable.

See also

hook_language_types_info_alter()

Related topics

2 functions implement hook_language_types_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

language_language_types_info in drupal/core/modules/language/language.module
Implements hook_language_types_info().
language_test_language_types_info in drupal/core/modules/language/tests/language_test.module
Implements hook_language_types_info().
1 invocation of hook_language_types_info()
language_types_info in drupal/core/includes/language.inc
Returns information about all defined language types.

File

drupal/core/modules/system/language.api.php, line 82
Hooks provided by the base system for language support.

Code

function hook_language_types_info() {
  return array(
    'custom_language_type' => array(
      'name' => t('Custom language'),
      'description' => t('A custom language type.'),
    ),
    'fixed_custom_language_type' => array(
      'fixed' => array(
        'custom_language_negotiation_method',
      ),
    ),
  );
}