Hi NogDob. First and foremost, I'd like to say thank you for your help.
You see, I'm learning php so I don't fully understand why I need (or not need) to put global $user. Right now I changed the code to that below and I can now see Log in Create Account. But switching to the French site doesn't translate the text (it remains Log in Create Account) .
Any idea why ? (I tried turning on the error reporting with no success unfortunately).
<?php
$strings = array(
'en' => array(
'logout' => 'Logout',
'my-account' => 'My Account',
'login' => 'Log In',
'create-account' => 'Create Account'
),
'fr' => array(
'logout' => 'Deconnexion',
'my-account' => 'Mon Compte',
'login' => 'Connexion',
'create-account' => 'Creer un Compte'
)
);
$language = $user->language;
if ( $user->uid ) {
print '<a href="'.base_path().'user/logout">'.$strings[$language]['logout'].'</a>';
print '<a href="'.base_path().'user/">'.$strings[$language]['my-account'].'</a>';
}else {
print '<a href="'.base_path().'user/login">'.$strings[$language]['login'].'</a>';
print '<a href="'.base_path().'user/register">'.$strings[$language]['create-account'].'</a>';
}
?>
Thanks for your help again !!!