Hello, as you know we can make the body of the node parse php when we use input format of PHP code,

so if we put print t("Today");

it will give the translation dependence of localization of your site,

now how can we make the title of the post /node parse php

like the Body,

---
i need to make the title of post show the translation of some words dependance of localization, all i need to make the title parse PHP,

is that possible??

Comments

benjaminlhaas’s picture

If you are using a theme that is based on phptemplate, look at node.tpl.php in your theme directory. You'll see the following line:

title="<?php print $title ?>"

This template is printing out the value of the $title variable. This variable is set in the function phptemplate_node() in phptemplate.engine. In there, $title is assigned the return value of check_plain($node->title). You can override this node theming function (or you can edit it here directly) and insert code to translate the node title before assigning it to $title.