private function loadLang($lang) {
        $locale = preg_replace_callback('/\b([a-z]{2})[-_](?:([a-z]{4})[-_])?([a-z]{2})\b/', function ($matches) {
            return $matches[1].'_'.(!empty($matches[2]) ? ucfirst($matches[2]).'_' : '').strtoupper($matches[3]);
        }, strtolower($lang));

        if (file_exists($filename = __DIR__.'/Lang/'.$locale.'.php')) {
            $this->lang = $locale;

            $this->number_word = include __DIR__.'/Lang/'.$locale.'.php';
            $this->currency = $this->number_word['currency'];

            return true;
        }
        throw new InvalidArgumentException('Unknown language ('.$lang.')');
    }
private function loadLang($lang) {
        $locale = preg_replace_callback('/\b([a-z]{2})[-_](?:([a-z]{4})[-_])?([a-z]{2})\b/', function ($matches) {
            return $matches[1].'_'.(!empty($matches[2]) ? ucfirst($matches[2]).'_' : '').strtoupper($matches[3]);
        }, strtolower($lang));

        if (file_exists($filename = __DIR__.'/Lang/'.$locale.'.php')) {
            $this->lang = $locale;

            $this->number_word = include __DIR__.'/Lang/'.$locale.'.php';
            $this->currency = $this->number_word['currency'];

            return true;
        }
        throw new InvalidArgumentException('Unknown language ('.$lang.')');
    }
private function loadLang ( $ lang ) { $ locale = preg_replace_callback ( '/\b([a-z]{2})[-_](?:([a-z]{4})[-_])?([a-z]{2})\b/' , function ( $ matches ) { return $ matches [ 1 ] . '_' . ( ! empty ( $ matches [ 2 ] ) ? ucfirst ( $ matches [ 2 ] ) . '_' : '' ) . strtoupper ( $ matches [ 3 ] ) ; } , strtolower ( $ lang ) ) ; if ( file_exists ( $ filename = __DIR__ . '/Lang/' . $ locale . '.php' ) ) { $ this -> lang = $ locale ; $ this -> number_word = include __DIR__ . '/Lang/' . $ locale . '.php' ; $ this -> currency = $ this -> number_word [ 'currency' ] ; return true ; } throw new InvalidArgumentException ( 'Unknown language (' . $ lang . ')' ) ; }
fetch language file

@param string $lang
@return void
fetch language file