I have the following custom function in template.php that prints a list of different links whether the user is logged in or not. I invoke this function in page.tpl.php . The problem here is that the strings wrapped with t() functions aren't available for translation. What I'm doing wrong?
<?php
// a function to output the user menu or a prompt for login
function phptemplate_cucino_user_menu() {
global $user;
$user_menu_links = array(
l(t('View Cookbook'), 'user/'. $user->uid .'/recipes', array('attributes' => array('title' => 'Go to your homepage', 'id' => 'user-cookbook'))),
l(t('Add a recipe'), 'node/add/recipe', array('attributes' => array('title' => 'Create a new recipe', 'id' => 'user-add-recipe'))),
l(t('Edit Account'), 'user/'. $user->uid .'/edit', array('attributes' => array('title' => 'Modify your personal account', 'id' => 'user-edit-account'))),
l(t('Log out'), 'logout', array('attributes' => array('title' => 'Log out', 'id' => 'user-log-out'))),
);
if ($user->uid) {
print theme('item_list', $user_menu_links, check_plain($user->name), 'ul', array('class' => 'grid_6'));
}
else {
print theme('item_list', array(
l(t('Log in'), 'user', array('attributes' => array('title' => 'Log in with an existing account'))),