"Recent posts" Block title doesn't get translated by localization module
Ralf Saalmueller - August 10, 2007 - 13:56
| Project: | Drupal |
| Version: | 5.7 |
| Component: | language system |
| Category: | support request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
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.

#1
Did 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.
#2
Any information before we close the issue with no feedback?
#3
I 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.
#4
Did you specify a custom title (with text "Recent posts") or did not customize that block at all?
#5
I 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
#6
Do 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.
#7
I 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
#8
Drupal 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).
#9
Thanks. To solve my problem I followed the answer to this issue:
Solution:
To be precise I changed
<?phpprint $block->subject
?>
<?phpprint t($block->subject)
?>
#10
Automatically closed -- issue fixed for two weeks with no activity.
#11
kdebass, thanks a lot for pointing out this useful trick.