You are here

function range_i18n_string_list_field_alter in Range 7

Implements hook_i18n_string_list_TEXTGROUP_alter().

File

./range.i18n.inc, line 11
Integration with Internationalization module.

Code

function range_i18n_string_list_field_alter(&$strings, $type = NULL, $object = NULL) {
  if ($type === 'field_instance' && $object['widget']['type'] === 'range') {
    $element =& $strings['field'][$object['field_name']][$object['bundle']];
    foreach (_range_translatable_field_instance_settings() as $key => $title) {
      list($l1, $l2) = explode('_', $key);
      $element[$key] = array(
        'title' => $title,
        'string' => $object['settings'][$l1][$l2],
      );
    }
  }
}