Drupal – Panel Pane Title Translation @ 2

Another way to translate the Panel pane title is by the Drupal template system. Create the panels-pane.tpl.php in your theme folder.

panels-pane.tpl.php

<?php
// $Id: panels-pane.tpl.php,v 1.1.2.1 2009/10/13 21:38:52 merlinofchaos Exp $
/**
* @file panels-pane.tpl.php
* Main panel pane template
*
* Variables available:
* - $pane->type: the content type inside this pane
* - $pane->subtype: The subtype, if applicable. If a view it will be the
*   view name; if a node it will be the nid, etc.
* - $title: The title of the content
* - $content: The actual content
* - $links: Any links associated with the content
* - $more: An optional 'more' link (destination only)
* - $admin_links: Administrative links associated with the content
* - $feeds: Any feed icons or associated with the content
* - $display: The complete panels display object containing all kinds of
*   data including the contexts and all of the other panes being displayed.
*/
?>
<div class="<?php print $classes; ?>" <?php print $id; ?>>
  <?php if ($admin_links): ?>
    <div class="admin-links panel-hide">
      <?php print $admin_links; ?>
    </div>
  <?php endif; ?>

  <?php if ($title): ?>
    <h2 class="pane-title"><?php print t($title); ?></h2>
  <?php endif; ?>

  <?php if ($feeds): ?>
    <div class="feed">
      <?php print $feeds; ?>
    </div>
  <?php endif; ?>

  <div class="pane-content">
    <?php print $content; ?>
  </div>

  <?php if ($links): ?>
    <div class="links">
      <?php print $links; ?>
    </div>
  <?php endif; ?>

  <?php if ($more): ?>
    <div class="more-link">
      <?php print $more; ?>
    </div>
  <?php endif; ?>
</div> 

 

The pane title string should be search-able in the Translate Interface now.

Done =)

Reference: Translating Pane Titles

Previous: Drupal – Panel Pane Title Translation @ 1

About these ads

One thought on “Drupal – Panel Pane Title Translation @ 2”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s