options['vid']); if (!empty($this->options['expose']['i18ntaxonomy_terms'])) { if (empty($this->options['hierarchy'])) { global $language; $options = array(); $result = db_query("SELECT * FROM {term_data} WHERE vid = %d AND language = '%s' ORDER BY weight, name", $vocabulary->vid, $language->language); while ($term = db_fetch_object($result)) { $options[$term->tid] = $term->name; } $form['value'] = array( '#type' => 'select', '#title' => t('Select terms from vocabulary @voc', array('@voc' => $vocabulary->name)), '#multiple' => TRUE, '#options' => $options, '#size' => min(9, count($options)), '#default_value' => $default_value, ); } } } function expose_options() { parent::expose_options(); $this->options['expose']['i18ntaxonomy_terms'] = FALSE; } function expose_form_right(&$form, &$form_state) { parent::expose_form_right($form, $form_state); $vocabulary = taxonomy_vocabulary_load($this->options['vid']); if (i18ntaxonomy_vocabulary($vocabulary->vid) == I18N_TAXONOMY_TRANSLATE) { $form['expose']['i18ntaxonomy_terms'] = array( '#type' => 'checkbox', '#title' => t('Limit list to terms with the same language that actual page language'), '#description' => t('If checked, the only items presented to the user will be the ones whit the same page language.'), '#default_value' => !empty($this->options['expose']['i18ntaxonomy_terms']), ); } } }