1 views_handler_relationship_translation.inc views_handler_relationship_translation::options_form(&$form, &$form_state)

Add a translation selector.

Overrides views_handler_relationship::options_form


core/modules/translation/views/views_handler_relationship_translation.inc, line 24
Definition of views_handler_relationship_translation.


Handles relationships for content translation sets and provides multiple options.


function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);

  $options = array(
    'all' => t('All'),
    'current' => t('Current language'),
    'default' => t('Default language'),
  $options = array_merge($options, views_language_list());
  $form['language'] = array(
    '#type' => 'select',
    '#options' => $options,
    '#default_value' => $this->options['language'],
    '#title' => t('Translation option'),
    '#description' => t('The translation options allows you to select which translation or translations in a translation set join on. Select "Current language" or "Default language" to join on the translation in the current or default language respectively. Select a specific language to join on a translation in that language. If you select "All", each translation will create a new row, which may appear to cause duplicates.'),