You are here

function language_types_configurable in Drupal 7

Returns only the configurable language types.

A language type maybe configurable or fixed. A fixed language type is a type whose language negotiation providers are module-defined and not altered through the user interface.

Parameters

$stored: Optional. By default retrieves values from the 'language_types' variable to avoid unnecessary hook invocations. If set to FALSE retrieves values from the actual language type definitions. This allows to react to alterations performed on the definitions by modules installed after the 'language_types' variable is set.

Return value

An array of language type names.

Related topics

7 calls to language_types_configurable()
drupal_render_cid_parts in includes/common.inc
Returns cache ID parts for building a cache ID.
language_negotiation_get_any in includes/language.inc
Checks if the language negotiation provider is enabled for any language type.
language_negotiation_set in includes/language.inc
Saves a list of language negotiation providers.
LocaleLanguageNegotiationInfoFunctionalTest::testInfoAlterations in modules/locale/locale.test
Tests alterations to language types/negotiation info.
locale_block_info in modules/locale/locale.module
Implements hook_block_info().

... See full list

1 string reference to 'language_types_configurable'
language_types_set in includes/language.inc
Updates the language type configuration.

File

includes/language.inc, line 139
Language Negotiation API.

Code

function language_types_configurable($stored = TRUE) {
  $configurable =& drupal_static(__FUNCTION__);
  if ($stored && !isset($configurable)) {
    $types = variable_get('language_types', drupal_language_types());
    $configurable = array_keys(array_filter($types));
  }
  if (!$stored) {
    $result = array();
    foreach (language_types_info() as $type => $info) {
      if (!isset($info['fixed'])) {
        $result[] = $type;
      }
    }
    return $result;
  }
  return $configurable;
}