function entity_translation_translatable_switch in Entity Translation 7
Toggle translatability of the given field.
This is called from a batch operation, but should only run once per field.
1 string reference to 'entity_translation_translatable_switch'
- entity_translation_translatable_form_submit in ./
entity_translation.admin.inc - Submit handler for the field settings form.
File
- ./
entity_translation.admin.inc, line 604 - The entity translation user interface.
Code
function entity_translation_translatable_switch($translatable, $field_name) {
$field = field_info_field($field_name);
if ($field['translatable'] === $translatable) {
return;
}
$field['translatable'] = $translatable;
field_update_field($field);
// This is needed for versions of Drupal core 7.10 and lower.
// See http://drupal.org/node/1380660 for details.
drupal_static_reset('field_available_languages');
}