function i18n_field_i18n_object_info in Internationalization 7
Implements hook_i18n_object_info().
File
- i18n_field/
i18n_field.i18n.inc, line 10 - Internationalization (i18n) hooks
Code
function i18n_field_i18n_object_info() {
$info['field'] = array(
'title' => t('Field'),
'class' => 'i18n_field',
'key' => 'field_name',
'load callback' => 'field_info_field',
'placeholders' => array(
'%field_ui_menu' => 'field_name',
'%field_type' => 'type',
),
'edit path' => 'admin/structure/types/manage/%bundle/fields/%field_ui_menu/field-settings',
// We can easily list all these objects
'list callback' => 'field_read_fields',
'string translation' => array(
'textgroup' => 'field',
'properties' => array(
'label' => array(
'title' => t('Label'),
),
),
),
);
$info['field_instance'] = array(
'title' => t('Field instance'),
'class' => 'i18n_field_instance',
'key' => array(
'field_name',
'bundle',
),
'placeholders' => array(
'%bundle' => 'bundle',
'%field_ui_menu' => 'field_name',
),
'edit path' => 'admin/structure/types/manage/%bundle/fields/%field_ui_menu',
// We can easily list all these objects.
'list callback' => 'field_read_instances',
// Metadata for string translation.
'string translation' => array(
'textgroup' => 'field',
'properties' => array(
'label' => array(
'title' => t('Label'),
),
'description' => array(
'title' => t('Description'),
'format' => 'format',
),
'default_value' => array(
'title' => t('Default value'),
'format' => 'format',
),
),
),
);
return $info;
}