已经添加il8n等多语言模块,并可以对内容类型下的story(basic page,panel,article)实现多语言.
我还有很多页面都是用的自定义页面创建的,以下内容如何实现多语言?
panel 标题有知道如何实现多语言?
Panels多语言没做过,帮你搜了下,希望能帮到你。
两种方法
通过自定义模块hook
// Panel alter to make the title translatable.function hook_panels_pane_content_alter($content, $pane, $args, $context) { if (isset($content->title)) { $content->title = t("!title", array('!title' => $content->title)); } return $content;}
2. 在自己的主题下重载panels-pane.tpl.php模板
<h2<?php print $title_attributes; ?>><?php print t($title); ?></h2>