Closed (fixed)
Project:
Drupal core
Version:
5.7
Component:
language system
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Aug 2007 at 13:56 UTC
Updated:
23 Jun 2008 at 15:41 UTC
We have a dual language (content and front-end) site and found out that way, that the menu item in the nevigation menu called "Recent posts" doesn't get translated even if there is a translated string in the localisation database.
Comments
Comment #1
gábor hojtsyDid you modify the menu item? In case you modify any property on the menu item, it is considered a user defined menu items, and is not translated anymore.
Comment #2
gábor hojtsyAny information before we close the issue with no feedback?
Comment #3
kdebaas commentedI have the same issue: When enabling the tracker as a block, adding the standard title "Recent posts", the title does not get translated when switching languages. On top of that, the title of the tracker page itself also does not get translated. (it did, before enabling the block)
The comments_recent block switches titles normally.
Comment #4
gábor hojtsyDid you specify a custom title (with text "Recent posts") or did not customize that block at all?
Comment #5
kdebaas commentedI did indeed. I noticed that the same happens with the standard recent comments block, but the other way around: if I enable a page view of it as well, its title is not translated.
If this is a feature, and not a bug, what would be the most consistent way around it?
Thanks
Comment #6
gábor hojtsyDo not specify a custom text. As soon as you specify something custom, Drupal sticks to it and will not translate. Same happens to menu items. If you rename them to some title of your choosing, the translation will not run anymore.
Comment #7
kdebaas commentedI understand, and anticipated this answer. However, if I need a title for the "Recent posts" that is translated into other languages, is there some way of achieving this without creating a new block per language?
Thanks
Comment #8
gábor hojtsyDrupal itself only does built-in interface translation and does not translate user input (such as custom block titles or menu items). For this, you need the i18n or localizer modules (which solve the block issue with different solutions to my understanding).
Comment #9
kdebaas commentedThanks. To solve my problem I followed the answer to this issue:
Solution:
To be precise I changed
print $block->subjecttoprint t($block->subject)Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #11
dergachev commentedkdebass, thanks a lot for pointing out this useful trick.