Horde_Registry::setLanguageEnvironment PHP Метод

setLanguageEnvironment() публичный Метод

When setting the language, the gettext catalogs have to be reloaded too, charsets have to be updated etc. This method takes care of all this.
public setLanguageEnvironment ( string $lang = null, string $app = null )
$lang string The new language.
$app string The application for reloading the gettext catalog. Uses current application if null.
    public function setLanguageEnvironment($lang = null, $app = null)
    {
        if (empty($app)) {
            $app = $this->getApp();
        }
        $old_lang = $this->setLanguage($lang);
        $this->setTextdomain($app, $this->get('fileroot', $app) . '/locale');
        if ($old_lang == $GLOBALS['language']) {
            return;
        }
        $GLOBALS['session']->remove('horde', 'nls/');
    }