function locale_field_language_alter

Implements hook_field_language_alter().

File

modules/locale/locale.module, line 470

Code

function locale_field_language_alter(&$display_language, $context) {
    // Do not apply core language fallback rules if they are disabled or if Locale
    // is not registered as a translation handler.
    if (variable_get('locale_field_language_fallback', TRUE) && field_has_translation_handler($context['entity_type'], 'locale')) {
        locale_field_language_fallback($display_language, $context['entity'], $context['language']);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.