Quantcast
Viewing latest article 3
Browse Latest Browse All 8

Drupal – Panel Pane Title Translation @ 1

In Panel page, we can configure the pane title at the content page.
Image may be NSFW.
Clik here to view.

 

By default, we could not translate these pane titles in Translate Interface. To fix this problem, we can override the template variable before rendering the panel pane. This could be done by add the template_preprocess_panels_pane() function in the theme template.php

function <theme>_preprocess_panels_pane(&$vars) {
    $content = $vars['output'];
    $vars['title'] = !empty($content->title) ? t('@title', array('@title' => $content->title)) : '';
}

 

Reload the panel page in the translate content first, then you can find the pane title in the Translate Interface.
Image may be NSFW.
Clik here to view.

 

Done =)

Next: Drupal – Panel Pane Title Translation @ 2

Update @ 2012-01-23: For Drupal 7 users, there is a patch in Panel which makes the Panel title translatable in Translate interface. For more information, please refer to this discussion. Thanks Anon. =)


Filed under: CMS Tagged: Drupal, Drupal Development, i18n, Panels, Postaday2011 Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing latest article 3
Browse Latest Browse All 8

Trending Articles