I am using BEF 6.x-3.0-beta1.

In English (currently dfault language but may be changed to Hebrew...) the exposed filters work fine with taxonomy term ID.

When I switch to Hebrew, the taxonomy terms are not being translated.

I found numerous 'solutions' on the Drupal site but none seem to do the trick.

This code, added to the template.tpl.php file translates the taxonomy terms correctly but the BEF checkboxes dissapear. Please help!

* Default theme function for all filter forms.
function YOURTHEME_preprocess_views_exposed_form(&$vars) {
$form = &$vars['form'];

foreach ($form['#info'] as $id => $info) {
$widget = new stdClass;
// set up defaults so that there's always something there.
$widget->label = $widget->operator = $widget->widget = NULL;

$widget->id = $form[$info['value']]['#id'];
if (!empty($info['label'])) {
$widget->label = $info['label'];
if (!empty($info['operator'])) {
$widget->operator = drupal_render($form[$info['operator']]);
//here's where you replace the terms with translated terms
$options = array();
foreach($form[$info['value']]['#options'] as $key=>$option) {
// $options[$key] = t($option);
//- $options[$key] = t($option);
//+ $options[$key]=tt('taxonomy:term:'. $key .':name', $option);
$options[$key]=tt('taxonomy:term:'. $key .':name', $option);

$form[$info['value']]['#options'] = $options;

//end modification
$widget->widget = drupal_render($form[$info['value']]);
$vars['widgets'][$id] = $widget;



mikeker’s picture

Status:Active» Postponed (maintainer needs more info)

The first thing to check is whether this is a Views issue or a BEF issue. Set the exposed filter option to the default select list -- this bypasses BEF's processing -- and see if the issue persists. If it does, then this is a Views issue and should be taken up in their issue queue. If not, please post here and include an export of the view in question (or a simplified version of the view if it's a complicated beast).

mikeker’s picture

Status:Postponed (maintainer needs more info)» Closed (cannot reproduce)

Closing after > 8 weeks with no reply...