In the latest dev the tabs can be now translated, but I cannot get the title of the quicktab to translate inside a panel in any way. I added the t()-function to the quicktab.module and now it seems to work. I'm not sure if it's good practice to do it that way, but here is a patch anyway.

CommentFileSizeAuthor
translate_title.patch486 bytesmErilainen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Pasqualle’s picture

Category: bug » support

The proposed patch is wrong. The tabs should be translatable with the i18nstrings module.
and it should be working properly as there was a fix lately #668698: Tabs translation

mErilainen’s picture

Title: Translate quicktabs titles » Translate quicktabs block titles
Category: support » bug

As I said, I can translate tabs, but not the block titles of the quicktabs. I'm not sure if there is a problem when I'm trying to use them with panels, but with the patch it works well.

I have tried to clear caches, refresh the quicktabs and blocks translations, but I just wont get them visible to the search to translate them.

Pasqualle’s picture

Category: bug » support

can you translate other block titles? other blocks, that are not QT blocks?

The patch works, but the patch is wrong. Block titles are not translated in Drupal by default.
If you really want it you should add t() to block.tpl.php or (block-quicktabs.tpl.php)

mErilainen’s picture

Is there anything bad adding the t()-function? I haven't seen it used in themes often.

I actually added that to my development installation, but I never committed that to our production server. The patch was committed and I cannot translate quicktabs block titles without it. Most of the other block titles have been translated. They are mostly views blocks, custom blocks (without titles) or blocks from 3rd party modules.

Pasqualle’s picture

http://api.drupal.org/api/function/t/7

However tempting it is, custom data from user input or other non-code sources should not be passed through t().

http://groups.drupal.org/node/15177

mErilainen’s picture

Yes I remember I read something related to it.

Anyhow, I think we have managed to translate the block titles with Block translations module which is part of i18n. But for some reason any block created with Quictabs just cannot be translated.

Zardoc’s picture

Translatable block titles in panels:

When a block is used in panels as content, in order for the title to be translatable the title used in the "title override" section of the content settings form in panels must match the title set in the "title override" section of the block configuration page in admin/build/blocks. This way i18nblocks will recognize the string and add it to the translate interface for translation and panels will use the appropriate title translation when rendering the block.

quitos’s picture

Hmmm not true Zardoc, I have a block titled "History" inside a panel tab-style, I have translated History to its spanish "Historia" and the title is always "History" regardless of language negotiation. If I put the block in a normal panel (not tab-style), the title is translated accordingly.

If I use title override in the panel options and set it to "History" (the same title as the block) the title is displayed as "History" but the problem remains, language negotiation doesn't change the title in the tabs.
If I use title override in the panel options and change it to say "Story" the title is displayed as "Story" but i18n doesn't recognise the new title string and thus I cannot translate it.

I'm using Panels, Blocks and Tabs panel style.

yngens’s picture

subscribe

petermallett’s picture

Edit: sorry, I just re-read the thread; I didn't pick up on this being specific interaction between your blocks and Panels. Sounds more likely to be an issue between Panels and i18nblocks. However, I'm not familiar with Panels.
----
Block titles are handled by the i18nblocks module.

Go to admin/build/block and edit your quicktabs block (eg. admin/build/block/configure/quicktabs/1) and make sure the Multilingual settings: Language field is set to 'All languages'.

Then refresh your block text group in admin/build/translate/refresh (or just view the block in a language other than the site's default). Then the block title should show up in the "Blocks" text group when you do a search.

drupalninja99’s picture

I think the issue is that Panels calls the blocks differently so i guess it's losing the translation along the way.

netw3rker’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)
danyll’s picture

This solution on StackOverflow worked for me.