Multilingual taxonomies
xarbot - October 23, 2009 - 07:33
| Project: | Taxonomy Defaults |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I have a multilingual taxonomies and when i put default values occurs two things. The first: when i save the values i have a blank page only with a message that says NULL. And second the default value don't appear when i create the page.
Can someone help me?
Thanks in advanced
Xarbot

#1
I can look at this over the weekend, but could you clarify how you're setting up multilingual vocabularies, as I've never worked on a multilingual site. I'm assuming you're using the i18n module, yes? According to http://drupal.org/node/313268 there are several translation modes. Which are you using?
The more detail you give, the more likely it is I'll be able to fix this soon.
Thx.
#2
Hello:
Yes i'm using i18n module and the taxonomies i have are with localize terms.
Thanks! :)
Xarbot
#3
Hello
Same issue. But it seems that if you select a term AND his traductions in the listbox, it works. It seems that the only issue is that you are not allowed to choose several terms if the vocabulary is not set to "multiple". (in your vocabulary configuration)
I had to change this line in
"taxonomy_defaults.admin.inc". Line 53 i put
<?php$vocabulary = taxonomy_vocabulary_load($vid);
$form[$type][$vid]['select']= _taxonomy_term_select(check_plain($vocabulary->name), $name, variable_get("taxdef_{$type}_{$vid}", 0), $vid, 'Choose terms from all languages if you use i18n', 1, array());
?>
instead of
<?php$form[$type][$vid]['select'] = taxonomy_form($vid, variable_get("taxdef_{$type}_{$vid}", 0));)
?>
that allows me to choose all the traductions of a terms (multiple select) within a vocabulary, even if the vocabulary is not set to "multiple".
it's not perfect but it does the job for the moment; without side effects i hope.
#4
It don't works for me. Only show the terms in the language i am, but not all terms.
Thanks
Xarbot
#5
My code is incorrect, sometimes it give to the node the two terms and anyway , this is too ugly :-/
However it should show you all the terms of any language, unless if you use different vocabularies for the different languages : for my part, i put the translated terms in the same vocabulary.
Forget the code above : you can do the same thing by set directly the vocabulary to "multiple" and then hide it.
It's difficult to make this module language aware, as it depents from the way you translate taxonomy i think...
If traducted terms are in the same vocabulary that normal terms, you have to know the language of the node with PHP; and then remove terms which don't belongs to this language...
I'm working on it but i'm not sure that it will fit for others sites than the one i am working on...