Download & Extend

Translating vocabulary names everywhere

Project:Internationalization
Version:6.x-1.2
Component:Blocks
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

I'm unable to translate vocabulary names. is this feature implemented ?

Comments

#1

Same problem!
i18n 6.x-1.2
drupal 6.14

#2

The same problem. Cannot translate vocabulary names.

i18n 6.x-1.2
drupal 6.14

#3

i work with i18n 6.x-1.1 and there vocabulary names can be translated so i suppose it should work in 6.x-1.2. (maybe a bug?)

make sure to enable 'Taxonomy translation' module

translation can be done in ' /admin/build/translate/search ' -> select taxonomy.
or you can use the translation table module at http://drupal.org/project/translation_table

#4

Actually i can translate vocab names there, but the problem is the translation does not appear in view and i still see the original name

#5

does this has something to do with #64004: Integration of i18n and views.module = fix translatablity of views?

from i18n's handbook page:

This is an ongoing work and it is a known fact that i18n's views support is far from complete so better than posting (yet another, duplicate) "I want better Views integration" feature request, you can comment on the existing one, #64004: Integration of i18n and views.module = fix translatablity of views Patches are welcomed though.

#6

@#5 nevertheless that issue was closed stating:

The original issue is fixed. Easier to pursue new ones in separate issues.

so probably this should be an ongoing issue by itself

#7

Thanks for participating @arhak,
No , i don't think it's related to that issue, this one is only about vocabulary names in node display. I tested it on a fresh drupal installation and translated vocabulary names but didn't see any change node's display.
I couldn't locate the code responsible to displaying vocab names simply by reviewing the source code , perhaps i need to check it more closely.

#8

reviewing the code (didn't debug it)

--> i18ntaxonomy_form_alter (default case)
--> i18ntaxonomy_node_form ( if ($vid == 'tags') {...} elseif (is_numeric($vid) && i18ntaxonomy_vocabulary($vid) == I18N_TAXONOMY_LOCALIZE) {...} )
--> i18ntaxonomy_vocabulary_form (return _i18ntaxonomy_term_select(check_plain(tt("taxonomy:vocabulary:$vid:name", $vocabulary->name)), ...);)

#9

@#8 now, that seems to be only for <select> widget

when it is free tagging I don't see vocabulary name translated

<?php
function i18ntaxonomy_node_form(&$form) {
  ...
    if (
$vid == 'tags') {
     
// Special treatment for tags, add some help texts
     
foreach (element_children($form['taxonomy']['tags']) as $vid) {
        if (
i18ntaxonomy_vocabulary($vid) == I18N_TAXONOMY_LOCALIZE) {
         
$form['taxonomy']['tags'][$vid]['#description'] .= ' '. t('This is a localizable vocabulary, so only terms in %language are allowed here.', array('%language' => language_default('name')));
        }
      }
    }
  ...
?>

am I missing something?

#10

I assume this also depends on which translation option is used:

- none
- localise (I18N_TAXONOMY_LOCALIZE) - localizable vocabulary
- per language (I18N_TAXONOMY_TRANSLATE) - fully multilingual vocabulary
- set "language to vocabulary" (I18N_TAXONOMY_LANGUAGE) - fixed language vocabulary

For option "set language to vocabulary" the translation issue might not be relevant, strictly speaking, as there is no coordinated translation - just different language taxonomy sets, switching according to assigned languages. For option "localise", I can't really say, since I'm not localising.

Option "per language" should be fully multilingual (I'm using this one). In order to be able to assign the different language terms' translations to each other, the vocabulary language should _not_ be defined (at least, this is how I understand it). For this setting, the string translations made for vocabulary name and help text do not appear in create/view/edit pages when the language is switched. This for both standard (page/story) and contrib module content.

Shouldn't the code relate in one or another way to...

taxonomy:vocabulary:$vid:name
taxonomy:vocabulary:$vid:help

There are some instances in i18ntaxonomy.module. But this is as far as I get on my own (I don't know how to code php).

By the way, others are experiencing this issue as well: [#313268] (first three comments Feb-April 2009 [not resolved]).

#11

@jeyro
i18n taxonomy synchronization was quite incomplete few month ago, i opened #605600: Taxonomy syncronization issues in October to address all this issues, fortunately Jose was also interested and he fixed the issues by re-factoring the code. It's looks fine to me now, the only issue remains as long as i know is vocabulary names' translation.

@arhak
I think that code is for fixing vocab translation in node edit , not node view. And you're right it's not complete, The patch proposed here #494576: Translate tags vocabulary name on node form? had a bug that i mentioned here http://drupal.org/node/494576#comment-2245840 and fixed here http://drupal.org/node/494576#comment-2254962, but it appears that the latest patch is not committed, so thanks for mentioning it i set that issue back to needs review.
Correcting my own comment #7, i think it might be related to #64004: Integration of i18n and views.module = fix translatablity of views , going to try the patches there and see if they fix this issues.
Thanks @arhak

#12

subscribing

#13

subscribing

#14

subscribing...

#15

Guys, please test this with i18ntaxonomy 1.2.

Basically code in this patch translates the vocabulary name and help string if translation mode is set to "Per language term".

If you want to apply this to 1.3, change tt() function to i18nstrings() as code in 1.3 was refactored.

AttachmentSizeStatusTest resultOperations
638556-15-i18ntaxonomy.module.patch898 bytesIgnored: Check issue status.NoneNone

#16

who can talk about different use case of different mode of taxonomy translation ?

I found that, per language terms mode, the translation term will have different term id.
Is there any SEO issue ?

#17

@maijs , thanks for the patch but it only work for node form. anyway i already fixed the latest path #494576: Translate tags vocabulary name on node form?. Please provide review if you're interested so we can make it RTBC.

@adrianmak, Well the latest patch #494576: Translate tags vocabulary name on node form? works for all types except Per language vocabs. Let me know if you have a better idea.

I tried to write a patch for node view as well but i could not figure out which part of the i need to modify. So i need an expert's help.

#18

subscribing...

#19

Component:Code» Blocks
Status:active» closed (won't fix)

Cleaning up the issue tracker. Closing all issues that haven't got any follow up for the last year.