The common approach is to store all the translations in a big array:
Code:
$LANG = array(
'en' => array(
'l_most' => 'most',
'l_often' => 'often'
),
'es' => array(
'l_most' => 'más',
'l_often' => 'a menudo'
),
'fr' => array(
'l_most' => 'plus',
'l_often' => 'souvent'
)
);
Store it in an external file, include it into every page, then
Code:
echo $LANG[$_SESSION['pref_lang']]['l_most']
where $_SESSION['pref_lang'] is the name of the language. However, beware of differing word order, especially if dealing with non-Romance languages. For this reason, every site I've ever seen translate things by the sentence rather than by the word.
Bookmarks