You are here

function i18n_field_translate_property in Internationalization 7

Translate field property

3 calls to i18n_field_translate_property()
i18n_field_entity_property_callback in i18n_field/i18n_field.module
Callback to translate entity property info for a fields.
i18n_field_field_attach_view_alter in i18n_field/i18n_field.module
Implements hook_field_attach_view_alter().
i18n_field_i18n_object_info_alter in i18n_field/i18n_field.module
Implements hook_i18n_object_info_alter().

File

i18n_field/i18n_field.module, line 425
Internationalization (i18n) module - Field handling

Code

function i18n_field_translate_property($instance, $property, $langcode = NULL) {

  // For performance reasons, we translate the whole instance once, which is cached.
  $instance = i18n_string_object_translate('field_instance', $instance, array(
    'langcode' => $langcode,
  ));
  return $instance[$property];
}