Пример #1
0
    {
        $this->bind();
        $f = __FUNCTION__;
        if ($this->EMULATEGETTEXT) {
            $f = [$this->GettextEmulator($this->realLocale), $f];
        }
        $r = call_user_func_array($f, func_get_args());
        $this->unbind();
        return $r;
    }
    function dcnpgettext()
    {
        $this->bind();
        $f = __FUNCTION__;
        if ($this->EMULATEGETTEXT) {
            $f = [$this->GettextEmulator($this->realLocale), $f];
        }
        $r = call_user_func_array($f, func_get_args());
        $this->unbind();
        return $r;
    }
    function GettextEmulator($lc = null)
    {
        if (!isset($this->GettextEmulators[$lc])) {
            $this->GettextEmulators[$lc] = new GettextEmulator($lc);
        }
        return $this->GettextEmulators[$lc];
    }
}
Translator::initialize();