1 language.api.php 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


Related topics


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


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_provider'),