hook_language_types_info()
Define language types.
array 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:
@todo Rename the 'fixed' key to something more meaningful, for instance 'negotiation settings'. See https://www.drupal.org/node/2166879.
hook_language_types_info_alter()
function hook_language_types_info() { return array( 'custom_language_type' => array( 'name' => t('Custom language'), 'description' => t('A custom language type.'), 'locked' => FALSE, ), 'fixed_custom_language_type' => array( 'locked' => TRUE, 'fixed' => array('custom_language_negotiation_method'), ), ); }
© 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/core!modules!language!language.api.php/function/hook_language_types_info/8.1.x