Skip navigation
Help

hook_language_types_info

7 locale.api.php 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

2 functions implement hook_language_types_info()

1 invocation of hook_language_types_info()

File

drupal/modules/locale/locale.api.php, line 89
Hooks provided by the Locale module.

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