Hello

I'm using the I18n module to build a multilingual site. My vocabulary uses localized terms, i.e. terms are commons to all languages but they can be translated.

How can I make use of this feature in Taxonomy VTN? I think it's something like calling the t_ function when printing the name, but I'm no PHP hacker.

Tanks in advance

PS. You can see how it's working:
En -> http://www.fjuan.es/en/tags/comercio-electronico
Es -> http://www.fjuan.es/tags/comercio-electronico

Comments

tomaszx’s picture

Hi.

Try change in taxonomy_vtn.pages.inc file

entry:

$voc_obj->name

to:

t($voc_obj->name)

in all code

etc.. for terms and nodes

and tell me what happen.

example in line 67 and 68

$index = drupal_strtoupper(drupal_substr($voc_obj->name, 0, $count_group_vocabularies));
$arr[$index][] = l($voc_obj->name, 'taxonomy_vtn/voc/'. $voc_obj->vid) . $count_terms . $voc_desc;

change to:

$index = drupal_strtoupper(drupal_substr(t($voc_obj->name), 0, $count_group_vocabularies));
$arr[$index][] = l(t($voc_obj->name), 'taxonomy_vtn/voc/'. $voc_obj->vid) . $count_terms . $voc_desc;

but i don't know if this work correct. maybe i should use l18n functions but i dont know this module...

fjuan’s picture

Hi tomaszx

thanks for your fast answer

I tried replacing that string, but nothing happened.

Maybe I should look in the i18n project which function may I use.

Thanks again and keep doing this great job!!

tomaszx’s picture

hi,

yes, i think that not help :( ... probably is only one way: use l18n function. If you try tell me what function i should use to implement this in taxonomy_vtn.

I'm happy to hear that my module is useful :)

regards.

chipway’s picture

Hi,

Any news about this ?

I have the same kind of issue :

I have a lot of Terms with Translations and translated Terms, but on Taxonomy VTN I get only english Terms.

How can I get the translated Term in Taxonomy VTN ?

Thank You

fjuan’s picture

It should be something like

tt("taxonomy:term:$term->tid:name", $term->name);
fjuan’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.