13. template.php
/**
* Implementation function hook_prerpocess_page().
*/
function my_theme_prerpocess_page(&$vars){
$vars [‘footer_slogan’] = t(‘Hello’) ;
// this $vars will be able in page.tpl.php
}
/**
* Implementation function
my_theme_prerpocess_node().
*/
function my_theme_prerpocess_node(&$vars){
// this $vars will be able in node.tpl.php
}
14. function t();
$output = t('There are currently %members ',
array('%members' => $user)
!variable — inserted without change
@variable — filtered HTML check_plain().
%variable — filtered theme('placeholder').
//bad
$message = 'An error occurred.';
drupal_set_message(t($message), 'error');
$output .= t($message);
//good
$message = t('An error occurred.');
drupal_set_message($message, 'error');
$output .= $message;