function hook_language_types_info
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 provider identifiers to use to initialize this language. Defining this key makes the language type non-configurable, so it will always use the specified providers in the given priority order. Omit to make the language type configurable.
See also
hook_language_types_info_alter()
Related topics
File
- 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_provider'), ), ); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!language.api.php/function/hook_language_types_info/7.x