title: Joomla 3 wrong language tag in PHP script
body: <p>I have a Joomla multi-language site (FR/EN), all menus and contents work with these two languages. However, in my PHP scripts en-GB is always selected:</p>
  
  <pre><code>$lang = JFactory::getLanguage();
   $language_tag = $lang-&gt;getTag();
   echo($language_tag);
  
  return always en-GB ?
  </code></pre>
  
  <p>Although the menus and breadcrumbs follow correctly the selected language in language filter module.</p>