The term names that are shown in a list are not translated. To do this you will need to integrate with i18n_taxonomy if enabled. Attached patch is based on a similar issue in the hierarchical select module issue queue and has thus been tested there and now also here by me.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mmartinov’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
FileSize
894 bytes

Thanks for the effort! i18n is a good feature.

I was going to mark your patch "needs work" as it is not correct in many aspects, but it's a simple change in a simple module so I've did the work myself. I'm attaching my patch bellow, please review and test if you have the possibility.

A few notes Re: your patch.
- It was not generated with "git diff" command, so I was not able to apply it, please take a look here how to create patches: http://drupal.org/project/webform_term_opts/git-instructions
- The version of this issue and the patch should be against 7.x-1.x-dev, not 1.0
- $prefix = $flat ? str_repeat('-', $term->depth) : ''; - This line is against the logic of the code, should be the opposite.
- t($term->name) - This is not a good idea.

mmartinov’s picture

Sorry, posted the patch file too early, here's the right one.

fietserwin’s picture

Status: Needs review » Reviewed & tested by the community

I'm only working from git on my own contrib module (and core, if I want to create a patch for that). For most other modules it is indeed often simple enough to pick up the change and just implement it. (I think the reason the patch didn't apply is that I left the .orig extension to the file in the resulting patch.)
- the $flat logic is indeed reversed (did not test it on a hierarchical vocabulary)
- the t() fallback is indeed questionable. Hierarchical Select did use it and I left that as it was, but taxonomy itself doesn't, so this could lead to strange (even erroneous) situations. I guess your decision is better. I think I will report this back to HS. (edit: done, see #1216214: D7 i18n Taxonomy compatibility)

mmartinov’s picture

Status: Reviewed & tested by the community » Fixed

Committed in the 7.x-1.x branch.

Status: Fixed » Closed (fixed)

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

bluesman2014’s picture

Version: 7.x-1.x-dev » 7.x-4.0
Issue summary: View changes
Status: Closed (fixed) » Active

Hi, I just installed the recommended version of this module and encountered the same problem.

I have a taxonomy translated into several languages. I can select the vocabulary inside the component, but on the form the terms are only displayed in the original language.

Is a new patch required or is there a setting that I might be missing?

giupenni’s picture

Same problem here

mcgowanm’s picture

Updated the patch for 7.x-4.0