function field_language_insert

Implements hook_language_insert().

Related topics

File

drupal/core/modules/field/field.multilingual.inc, line 75
Functions implementing Field API multilingual support.

Code

function field_language_insert() {
  field_info_cache_clear();

  // If the number of languages is bigger than 1, enable the core language
  // fallback rules.
  // Because the language_count is updated only after the hook is invoked, we
  // check if the language_count is bigger or equal with 1 at the current time.
  if (variable_get('language_count', 1) >= 1) {
    variable_set('field_language_fallback', TRUE);
  }
}