Fetch language declaration into JavaScript variable
<p>So I've got a an HTML5 website setup and I've been programming a for of language toggle</p>

<p>The site always starts like this...</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;!--[if IE 7]&gt;&lt;html lang="fr" class="no-js ie7"&gt;&lt;![endif]--&gt;
&lt;!--[if IE 8]&gt;&lt;html lang="fr" class="no-js ie8"&gt;&lt;![endif]--&gt;
&lt;!--[if gt IE 8]&gt;&lt;!--&gt;
&lt;html lang="fr" class="no-js"&gt;
</code></pre>

<p>I'm building a language detection script and I'm trying to cache </p>

<pre><code>&lt;html lang="fr" class="no-js"&gt;
</code></pre>

<p>Or more specifically the "fr" and "en" into a variable upon the activation of my script...</p>

<p>How would I go about fetching the language declaration into a variable?</p>
