I am setting the locale of the website using this function:
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
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.
How would I do this?