Setting language for user
<p>I would like my php website to be able to be multilinguistic. I thought of using:</p>

<pre><code>echo $lang[$_SESSION['lang']]['WellcomeMessage'];
</code></pre>

<p>but I found that I will be needing to format the text, say for example male/female or putting some values from the DB. So I thought that simple strings might not do the trick for formatting?</p>

<p>I know <code>#define</code> might have worked in C as the string translates to code, but I don't know how php does that. For example:</p>

<pre><code>define ($lang['en']['credit_left'],'you have $credits_left');
define ($lang['sp']['credit_left'],'tienes $credits_left creditos mas');
</code></pre>

<p>Any suggestions?</p>
