You are here

public function views_handler_relationship_translation::options_form in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 modules/translation/views_handler_relationship_translation.inc \views_handler_relationship_translation::options_form()
  2. 6.2 modules/translation/views_handler_relationship_translation.inc \views_handler_relationship_translation::options_form()

Add a translation selector.

Overrides views_handler_relationship::options_form

File

modules/translation/views_handler_relationship_translation.inc, line 29
Definition of views_handler_relationship_translation.

Class

views_handler_relationship_translation
Handles relationships for content translation sets and provides multiple options.

Code

public 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.'),
  );
}