function language_language_types_info

Implements hook_language_types_info().

Defines the three core language types:

  • Interface language is the only configurable language type in core. It is used by t() as the default language if none is specified.
  • Content language is by default non-configurable and inherits the interface language negotiated value. It is used by the Field API to determine the display language for fields if no explicit value is specified.
  • URL language is by default non-configurable and is determined through the URL language negotiation method or the URL fallback language negotiation method if no language can be detected. It is used by l() as the default language if none is specified.

File

drupal/core/modules/language/language.module, line 581
Add language handling functionality to Drupal.

Code

function language_language_types_info() {
  language_negotiation_include();
  return array(
    LANGUAGE_TYPE_INTERFACE => array(
      'name' => t('User interface text'),
      'description' => t('Order of language detection methods for user interface text. If a translation of user interface text is available in the detected language, it will be displayed.'),
    ),
    LANGUAGE_TYPE_CONTENT => array(
      'name' => t('Content'),
      'description' => t('Order of language detection methods for content. If a version of content is available in the detected language, it will be displayed.'),
      'fixed' => array(
        LANGUAGE_NEGOTIATION_INTERFACE,
      ),
    ),
    LANGUAGE_TYPE_URL => array(
      'fixed' => array(
        LANGUAGE_NEGOTIATION_URL,
        LANGUAGE_NEGOTIATION_URL_FALLBACK,
      ),
    ),
  );
}