Pop\I18n\I18n::__construct PHP Метод

__construct() публичный Метод

Instantiate the I18n object.
public __construct ( string $lang = null ) : I18n
$lang string
Результат I18n
    public function __construct($lang = null)
    {
        if (null === $lang) {
            $lang = defined('POP_LANG') ? POP_LANG : 'en_US';
        }
        if (strpos($lang, '_') !== false) {
            $ary = explode('_', $lang);
            $this->language = $ary[0];
            $this->locale = $ary[1];
        } else {
            $this->language = $lang;
            $this->locale = strtoupper($lang);
        }
        $this->loadCurrentLanguage();
    }