1. drupal
    1. 8
    2. 7
7 – 8 hook_language_types_info()

Allow modules to define their own language types.

Return value

An array of language type definitions. Each language type has an identifier key. The language type definition is an associative array that may contain the following key-value pairs:

  • "name": The human-readable language type identifier.
  • "description": A description of the language type.
  • "fixed": An array of language provider identifiers. Defining this key makes the language type non-configurable.

Related topics


modules/locale/locale.api.php, line 89

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