title: PHP- Get current locale
body: <p>I am setting the locale of the website using this function:</p>
  
  <pre><code>function set_locale($locale) { // ie. en, es
  
      $language = $locale;
      putenv("LANG=".$language); 
      setlocale(LC_ALL, $language);
      $domain = "phd";
      bindtextdomain($domain, "locale"); 
      bind_textdomain_codeset($domain, 'UTF-8');
  
      textdomain($domain);
  
  } // end set_locale
  </code></pre>
  
  <p>When someone visits the site, they have the ability to change their locale. What I am trying to do is somewhere else in the site retrieve what the current locale is.</p>
  
  <p>How would I do this?</p>