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
hook_language_types_info_alter()
Related topics
File
- core/
modules/ system/ language.api.php, line 81 - 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'),
),
);
}