Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The forums vocabulary title ('Forums') is not localizable.
Workaround is to directly edit the vocabulary table.
Comment | File | Size | Author |
---|---|---|---|
#1 | Drupal-forum-missing-t.patch | 970 bytes | Gábor Hojtsy |
Comments
Comment #1
Gábor HojtsyHere is a patch.
Comment #2
Steven CreditAttribution: Steven commentedWhere exactly is this title displayed? As far as I can tell, the vocabulary is only saved once, so changing the localization won't affect the title if you've already caused _forum_get_vid() to be invoked one way or the other...
Comment #3
Gábor HojtsySteven, this title is surely displayed if you use some multifaceted navigation tool (eg. taxonomy navigation modules).
Comment #4
Steven CreditAttribution: Steven commentedThose were really two points, I guess it wasn't clear.
My point is that this patch does not appear to solve the problem if you already have an untranslated forums title in the database. Changing the localization at that point will not affect it, as the variable "forum_nav_vocabulary" will be set.
Comment #5
Steven CreditAttribution: Steven commentedI just realized, this patch will fail with multi-language sites. Only one localization will be stored in the database, and keep being used regardless of user choice.
This really needs a different fix for this and the earlier reason.
Comment #6
Gábor HojtsySteven, vocabulary names are single language all across Drupal. It should not mean that Drupal should enforce an English name on the forums vocab, should it? The idea is to populate the title field with the site default locale on forum setup time.
Comment #7
Bèr Kessels CreditAttribution: Bèr Kessels commented-1: We should never ever t() any user submitted content. i18n will fix this for you, because it allows translation of taxonomies.
Comment #8
Gábor HojtsyBer, we are not applying t() to user submitted content!
Comment #9
Steven CreditAttribution: Steven commentedI'm still in Ber's camp. This whole patch relies on a bunch of odd conditions:
a) Locale.module must be enabled.
b) An appropriate translation must be installed.
c) The admin has never visited the forums admin screen before.
If and only if all of these are satisfied, the Forums vocabulary name will be translated, but only once, into the language of that the admin is using. For all intents and purposes, this string can be considered untranslatable.
Comment #10
Dries CreditAttribution: Dries commentedNot going to fix this using the locale system.