开发者

Drupal: how to add multilingual content to page templates?

I sometimes add to page.tpl.php file, some text, but I would like to make it multilingual.

I've tried to use t('blabla') function, but the text just disappears. I guess this function is used in forms only and not fo开发者_如何学Cr theme templates.

How can I make it ?

Thanks


You can use t() everywhere, but don't forget to print the return value. Try this:

<?php print t('Translatable text in English'); ?>

Visit the page at least once and then head over to the translations admin page to enter the translation for your English text.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜