So I've got a views page displaying a list of nodes from specific content type. This view has filter form exposed in a block.
Some of the filters in the form are vocabularies. I'm using the BEF module to display the terms from each vocabulary as checkboxes instead of the default select lists.
The terms are translated - I'm using i18ntaxonomy for that, the vocabularies have this option selected: Localize terms. Terms are common for all languages, but their name and description may be localized.
The problem is that when the site is displayed in other languages different than the default one, the terms in the form are not translated.
I guess the problem is not with BEF as when I disable the module the terms remain untranslated.
I'm looking for any advice on how to debug/solve this issue.
This is definitely not the correct way to do it, but as the project deadline is tomorrow I've got no other choice but to hack the views module source code:
--- a/htdocs/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc
+++ b/htdocs/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc
@@ -122,7 +122,7 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on
$result = db_query("SELECT td.* FROM {term_data} td INNER JOIN {vocabulary} v ON td.vid = v.vid ORDER BY v.weight, v.name, td.weight, td.name");
}
while ($term = db_fetch_object($result)) {
- $options[$term->tid] = $term->name;
+ $options[$term->tid] = i18ntaxonomy_translate_term_name($term);
}
}
I don't think a patch for the views module will be accepted. Any suggestions how should I proceed with this?