I introduce a modification to sort terms in the function function _taxonomy_hide_sort($a, $b) from taxonomy_hide.inc:

  elseif ($string = strcasecmp(t($a->name), t($b->name))) {
    return $string;
  }

With t(), that is the translated terms that are compared.

I'm not sure of my code because I'm not a i18n specialist but that works for me. I use the "Localize terms. Terms are common for all languages, but their name and description may be localized." option for my vocabularies when i18n module is enabled.

I noted the modification proposed here for the hook:
http://drupal.org/node/308133#comment-1111973
But as I don't understand how to implement it, I used the official published code.

It would be nice to display the vocabulary title too.

CommentFileSizeAuthor
#2 364490_2-D6.patch837 bytesmathieu
#1 364490-D6.patch432 bytesmathieu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mathieu’s picture

FileSize
432 bytes

Here's a patch with the above adapted to use the new i18nstrings approach. Tested (and used in production) with i18n 6.x-1.9.

mathieu’s picture

FileSize
837 bytes

Same thing, but calling i18nstrings instead of the obsolete tt()... and making sure the function is available and that the vocabulary is translatable first.

Note that this does not solve sorting issues. The call to strcasecmp() should be using whatever was defined by setlocale(), but it doesn't seem to work too well for me. That's a different issue, I guess.