l::load PHP Method

load() static public method

static public load ( $file )
    static function load($file)
    {
        // replace the language variable
        $file = str_replace('{language}', l::current(), $file);
        // check if it exists
        if (file_exists($file)) {
            require $file;
            return l::get();
        }
        // try to find the default language file
        $file = str_replace('{language}', c::get('language', 'en'), $file);
        // check again if it exists
        if (file_exists($file)) {
            require $file;
        }
        return l::get();
    }