private function load_tables() {
        if (is_array($this->cache_translations) &&
            is_array($this->table_originals) &&
            is_array($this->table_translations)
        )
            return;

        /* get original and translations tables */
        fseek($this->STREAM, $this->originals);
        $this->table_originals = $this->readintarray($this->total * 2);
        fseek($this->STREAM, $this->translations);
        $this->table_translations = $this->readintarray($this->total * 2);

        if ($this->enable_cache) {
            $this->cache_translations = array('' => NULL);
            /* read all strings in the cache */
            for ($i = 0; $i < $this->total; $i++) {
                if ($this->table_originals[$i * 2 + 1] > 0) {
                    fseek($this->STREAM, $this->table_originals[$i * 2 + 2]);
                    $original = fread($this->STREAM, $this->table_originals[$i * 2 + 1]);
                    fseek($this->STREAM, $this->table_translations[$i * 2 + 2]);
                    $translation = fread($this->STREAM, $this->table_translations[$i * 2 + 1]);
                    $this->cache_translations[$original] = $translation;
                }
            }
        }
    }
private function load_tables() {
        if (is_array($this->cache_translations) &&
            is_array($this->table_originals) &&
            is_array($this->table_translations)
        )
            return;

        /* get original and translations tables */
        fseek($this->STREAM, $this->originals);
        $this->table_originals = $this->readintarray($this->total * 2);
        fseek($this->STREAM, $this->translations);
        $this->table_translations = $this->readintarray($this->total * 2);

        if ($this->enable_cache) {
            $this->cache_translations = array('' => NULL);
            /* read all strings in the cache */
            for ($i = 0; $i < $this->total; $i++) {
                if ($this->table_originals[$i * 2 + 1] > 0) {
                    fseek($this->STREAM, $this->table_originals[$i * 2 + 2]);
                    $original = fread($this->STREAM, $this->table_originals[$i * 2 + 1]);
                    fseek($this->STREAM, $this->table_translations[$i * 2 + 2]);
                    $translation = fread($this->STREAM, $this->table_translations[$i * 2 + 1]);
                    $this->cache_translations[$original] = $translation;
                }
            }
        }
    }
private function load_tables ( ) { if ( is_array ( $ this -> cache_translations ) && is_array ( $ this -> table_originals ) && is_array ( $ this -> table_translations ) ) return ; /* get original and translations tables */ fseek ( $ this -> STREAM , $ this -> originals ) ; $ this -> table_originals = $ this -> readintarray ( $ this -> total * 2 ) ; fseek ( $ this -> STREAM , $ this -> translations ) ; $ this -> table_translations = $ this -> readintarray ( $ this -> total * 2 ) ; if ( $ this -> enable_cache ) { $ this -> cache_translations = array ( '' => NULL ) ; /* read all strings in the cache */ for ( $ i = 0 ; $ i < $ this -> total ; $ i ++ ) { if ( $ this -> table_originals [ $ i * 2 + 1 ] > 0 ) { fseek ( $ this -> STREAM , $ this -> table_originals [ $ i * 2 + 2 ] ) ; $ original = fread ( $ this -> STREAM , $ this -> table_originals [ $ i * 2 + 1 ] ) ; fseek ( $ this -> STREAM , $ this -> table_translations [ $ i * 2 + 2 ] ) ; $ translation = fread ( $ this -> STREAM , $ this -> table_translations [ $ i * 2 + 1 ] ) ; $ this -> cache_translations [ $ original ] = $ translation ; } } } }
Loads the translation tables from the MO file into the cache
If caching is enabled, also loads all strings into a cache
to speed up translation lookups

@access private
Loads the translation tables from the MO file into the cache If caching is enabled also loads all strings into a cache to speed up translation lookups