Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The node.tpl.php template contains untranslatable texts 'Posted on"and "By". you will only notice so, if the option to display submission info has been enabled for a content type. to solve, either:
- use the standard text and use translation and the string overrides module to change it to your likings
- define your own translatable string in tempalte.php
- use a format that should not have to be translated.
For an example of the latter see garland/template.php:
/**
* Override or insert variables into the node template.
*/
function garland_preprocess_node(&$vars) {
$vars['submitted'] = $vars['date'] . ' — ' . $vars['name'];
}
/**
* Override or insert variables into the comment template.
*/
function garland_preprocess_comment(&$vars) {
$vars['submitted'] = $vars['created'] . ' — ' . $vars['author'];
}