You are here

function hook_i18n_field_info in Internationalization 7

Provide information about callbacks for translating specific field types.

This information can be retrieved using i18n_field_type_info().

For examples of both callback types:

Return value

Array of values indexed by field type. Valid keys are:

  • 'translate_default', Callback for translating the default value for this field type.
  • 'translate_options', Callback for translating options for this field type.

See also

i18n_field_type_info()

i18n_field_i18n_field_info()

i18n_field_translate_allowed_values()

i18n_field_translate_default()

1 function implements hook_i18n_field_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

i18n_field_i18n_field_info in i18n_field/i18n_field.i18n.inc
Implements hook_i18n_field_info().
1 invocation of hook_i18n_field_info()
i18n_field_type_info in i18n_field/i18n_field.module
Get i18n information for translating fields.

File

i18n_field/i18n_field.api.php, line 35
API documentation file for Field translation module.

Code

function hook_i18n_field_info() {
  $info['text'] = $info['text_long'] = $info['text_with_summary'] = array(
    'translate_default' => 'i18n_field_translate_default',
  );
  $info['list_text'] = $info['list_boolean'] = $info['list_integer'] = array(
    'translate_options' => 'i18n_field_translate_allowed_values',
  );
  return $info;
}