Variable different on php echo and javascript alert
<p>I have a dynamic multilanguage website. 
My php echos the current language right, but javascript doesn't even if loading after body.</p>

<p>My php:</p>

<pre><code>&lt;?php echo $language ?&gt;
</code></pre>

<p>This gives me english, portuguese, german or french accordingly to the one is being used.</p>

<p>when i try with javascript this way:</p>

<pre><code>    &lt;script type="text/javascript"&gt;
    function language() {
        var ci = {
            language : "&lt;?php echo $language; ?&gt;"
        };
        if(ci.language = 'portuguese') {
            alert(ci.language);
            return false;
            fb_language = "pt_PT";
        } else if (ci.language = 'english') {
            alert(ci.language);
            return false;
            fb_language = "en_US";
        } else if (ci.language = 'german') {
            alert(ci.language);
            return false;
            fb_language = "de_DE";
        } else if (ci.language = 'french') {
            alert(ci.language);
            return false;
            fb_language = "fr_FR";
        } else {
            fb_language = "en_US";
        }
    };
    &lt;/script&gt;

&lt;body onload="language();"&gt;
</code></pre>

<p>It always gives me portuguese in javascript, can't make it alert the right language, but in php it gives me the right language im using.</p>
