Localization with i18n requires a single vocabulary to be set to no language, but items in the vocabulary to be set to the required language (in my case, that's Welsh and English).
As it stands, the taxonomy_filter outputs both languages everytime.
Can I suggest the following change to the taxonomy_filter_vocab_top_level_terms function
$result = db_query(db_rewrite_sql("SELECT td.tid, td.* FROM {term_hierarchy} t, {term_data} td
WHERE t.tid = td.tid AND
td.vid = %d AND t.parent = 0 and
td.language = '" . i18n_get_lang() . "'
ORDER BY td.weight, td.name", 'td', 'tid'), $vid);
That allows the language to be taken into account.
Eben
Comments
Comment #1
styro commentedNot being very clued up on the i18n module, I've got some questions:
I assume this change would only work if the 118n module is installed?
Would this functionality be better as some sort of override in an i18n contrib module? (not quite sure how that could work yet though)
I'm just trying to think up a cleaner way of implementing it. The quick and dirty way would be to just check for i18n, and create a different query, but I'd like to handle it a bit more elegantly if possible.
Comment #2
styro commentedComment #3
solotandem commentedClosed for at least two reasons:
version 4.7 module is not supported
language support is handled differently in 5.x and 6.x.