Habari\Locale::load_domain PHP Метод

load_domain() приватный статический Метод

Translations are stored in gettext-style .mo files. The internal workings of the file format are not entirely meant to be understood.
private static load_domain ( string $domain ) : boolean
$domain string the domain to load
Результат boolean true if data was successfully loaded, false otherwise
    private static function load_domain($domain)
    {
        $file_end = self::$locale . '/LC_MESSAGES/' . $domain . '.mo';
        if (file_exists(Site::get_dir('config') . '/locale/' . $file_end)) {
            $file = Site::get_dir('config') . '/locale/' . $file_end;
        } else {
            if (file_exists(HABARI_PATH . '/user/locale/' . $file_end)) {
                $file = HABARI_PATH . '/user/locale/' . $file_end;
            } else {
                if (file_exists(HABARI_PATH . '/3rdparty/locale/' . $file_end)) {
                    $file = HABARI_PATH . '/3rdparty/locale/' . $file_end;
                } else {
                    $file = HABARI_PATH . '/system/locale/' . $file_end;
                }
            }
        }
        return self::load_file($domain, $file);
    }