I have installed the Glossary and i18n modules on my site, and I'm wondering how we could internationalise the Glossary module.
Glossary is a filter that searches for terms from a vocabulary in the text of nodes and adds their definition into the node.
The module appears to find the first instance of a term in the vocabulary that matches, regardless of language. This creates a problem when you have a term that is the same in two languages, for example:
"RAM" has a definition in English, and also has a definition in German. When on an English node the English "RAM" should be matched, on a German node the German "RAM" should be matched.
I would like to internationalise the Glossary module so that it checks the language of the node and then only searches the vocabulary for terms with that language. I was wondering how this should be done? Do we add a module into the i18n module? Or do we patch the Glossary module to check if i18n is active and then if it is, check the language?
Comments
Comment #1
AaronCollier commentedSee #258843: i18n support for Drupal 6.x for work being done inside the Glossary module. Glossary worked fine for 5.x (see #233688: i18n support), but appears to have lost functionality in the shift to the new system of 6.x.
Comment #2
nancydruI am the Glossary maintainer. I suspect this should actually be a support request. I just need to know how to identify which term is which language, if that is possible.
Comment #3
AaronCollier commentedIt depends on the choice of language options for vocabulary. Under the translatable choice, each term has language set in term_data under the setting "language".
Example from my table:
where N≈† = NŠ
Edit: And there's a function to check for translations:
Comment #4
nancydruI did just see your response to http://drupal.org/node/233817. I just committed a change to all my db_rewrite_sql statements so they will hopefully get seen by i18n. This will be in the -dev version shortly. It was unnecessary in 5.x.
If you have a "language" column in term_data, then they have done something that is largely considered a no-no in Drupal. There is no "language" column in my term_data table, so they had to have modified a core table.
Comment #5
nancydruAs for calling functions to translate, I am extremely reluctant to do so. Glossary is already performance-bound and more calls and queries is too likely to push it over the edge and make it unusable.
Comment #6
nancydruWrong queue to assign it to myself
Comment #7
AaronCollier commented#258843: i18n support for Drupal 6.x
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.