Closed (outdated)
Project:
Glossary
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Mar 2009 at 19:48 UTC
Updated:
1 May 2017 at 15:12 UTC
Jump to comment: Most recent
Hi there,
I have a multilanguage setup with i18n, and am having the same problems outlined in this thread http://drupal.org/node/256415
that being, All glossary terms in all languages are appearing as links on every translated pages throughout the site. Ie on a Spanish page, i get English terms and Spanish terms, and on a English page i get the same.
I am using the dev version of glossary as it seems to have some i18n functions included. Am also using the hovertips module.
I have setup my vocabs as per this Aaron's suggestion here http://drupal.org/node/258843#comment-847015
Any help is much appreciated!!
thanks
Comments
Comment #1
nikitas commentedhave u tried this one>? http://drupal.org/project/l10n_client instead of i18n.
i know that's not what you r asking for but it might works for you.
Check the screencasts for better understanding.
I had the same problems with other langs and worked just fine.
Comment #2
milos1234 commentedHi Nikitas
I am also using that module to translate interface strings throughout the site, but it doesnt seem to help with the glossary issue at all. How were you suggesting to use it?
thanks
Comment #3
nikitas commentedcorrect me if i m wrong but what'r u saying is that " . . . altgough i've translated my terms . . . i still get nothing or i have two versions ( each language) on each page ?
When you say glossary you mean basic Drupal "code-words" as views,taxonomy etc. ? Cause i think if so it's more configuration issue and not a bug or something/
P.S Did u try various combination of the options inside site configuration->languages ?
do u have enabled path prefix only ( or with fallback ) at the configure tab ?
have u watched this screencast ? http://blip.tv/file/611791 it mights help . :D
. . .
check here for example www.plasisgroup.com left column languages block ( Ελληνικά English ) you want to do something similar ? when pressing english -> all site translated into english and vise versa.
Comment #4
jvieille commentedI seem to have the same problem.
I defined a single term in 3 languages. it is an acronym, so it is the same term, but with different description in the 3 languages.
However, Glossary always displays the first term it finds whatever is the node language.
It seems that Glossary is totally ignorant of language.
Not sure my issue is related to this one.
I opened a new thread
http://drupal.org/node/401348
Comment #5
milos1234 commentedok, i have played around with every possible language setting, and think I have a solution!
BUT, for it to work, the cache needs to be flushed when changing language.
is there a way to disable caching on the Glossary plugin?
thanks
Comment #6
guillaumeduveauDisabling the cache on the glossary seems risky for the performance !
Comment #7
milos1234 commented@guix:
yes, but it seems essential for the glossary to work with i18n and hovertips. i'm open to ideas?
Comment #8
jvieille commented"..think I have a solution!"
What is the solution?
Do you mean that simply going to "admin/settings/glossary/clearcache" can makes it work?
- that a the same term defined in different languages will pop up correctly according to the language page?
- that the glossary cache must be cleared each time the page language changes?
Comment #9
milos1234 commented@jvielle
no, its needs to be a full cache flush. the glossary flush cache, or even turning off all caching in the admin area wont cut it.
yes, this is what i had a solution to. for Glossary to work with i18n and hovertips the language settings needs to be as below. (and i tried them ALL)
Set language negotiation: "Current language and language neutral."
Create a new Vocabulary: mine is called "Glossary Terms"
For the vocab choose: "Per language terms. Different terms will be allowed for each language and they can be translated."
When making the vocabulary, do not set a language from the drop box. Leave it as empty.
Create a new term and description: Set the language for that term.
then your terms will appear as hovertips on the right nodes depending on which language you are viewing in. however, this only happens when you: (a)Switch Language (b)then flush the cache entirely.
i am yet to work out exaclty which part of the cache needs flushing to affect he glossary terms, so only a full flush will work.
as above. just flushing the glossary cache doesn't seem to fix the problem.
please see this comment to how to flush cache entirely at all times. http://drupal.org/node/241673#comment-1344308
Comment #10
jvieille commentedThank you, this is crystal clear.
I changed the status to bug, as we know now that the feature almost works, and the supporting phase is over...
Something is missing in Glossary code. Hoping a better solution will come up soon!
Comment #11
harrrrrrr commentedif you use different terms/language in taxonomy, you can change this function in glossary.module & it will work:
Comment #12
dademurphy commentedSlight Variation to handle large sets of terms more effectivley.
Similar to the solution above but only loads the language you currently have selected as opposed to all terms for all languages.
function _glossary_get_terms($format) {
static $terms = FALSE;
global $language;
$show_all = variable_get('glossary_allow_no_description', FALSE);
$taxonomy_image_enabled = module_exists('taxonomy_image');
if ($terms === FALSE) {
$terms = $synonyms = array();
$vids = variable_get("glossary_vids_$format", 0);
foreach ($vids as $vid) {
$synonyms = _glossary_get_synonyms($vid);
// Get all glossary terms and attach synonyms.
// Omit terms without a description. those are usually container terms.
$result = db_query(db_rewrite_sql("SELECT t.tid, t.name, t.description, COUNT(tn.nid) as nodes FROM {term_data} t LEFT JOIN {term_node} tn USING(tid) WHERE t.vid=%d and t.language = '%s' GROUP BY t.tid, t.name, t.description ORDER BY LENGTH(t.name) DESC", 't', 'tid'), array($vid,$language->language));
while ($term = db_fetch_object($result)) {
if ($term->nodes) {
// If there were any nodes attached, we need to see if they were unpublished.
$unpubs = db_result(db_query(db_rewrite_sql("SELECT COUNT(n.nid) FROM {term_node} tn JOIN {node} n USING (nid) WHERE tn.tid=%d AND n.status=0"), $term->tid));
$term->nodes -= $unpubs;
}
if ($term->description || $show_all) {
$term->synonyms = $synonyms[$term->tid];
$term->synonyms[] = filter_xss($term->name);
$term->vid = $vid;
$terms[] = $term;
}
if ($taxonomy_image_enabled) {
$term->image = taxonomy_image_display($term->tid);
}
else {
$term->image = NULL;
}
}
}
}
return $terms;
}
Comment #13
dkoukoul commentedI 've tried the above solutions but don't seem to work...
I have one vocabulary "Glossary" which is set to "Per language terms. Different terms will be allowed for each language and they can be translated."
then I have taxonomy terms each defined as an English term and another one defined as a Greek term and set their translation in taxonomy.
In the English glossary page I see only the english terms but in the greek page (/el/glossary) I see both the english and the greek terms with their description!
Any advise on how to debug or any other work around?
Thanks in advance
Sorry... solution found...
http://drupal.org/node/401348#comment-3616308
Comment #14
nancydru