Pop\I18n\I18n::getLanguage PHP Method

getLanguage() public method

Get current language setting.
public getLanguage ( ) : string
return string
    public function getLanguage()
    {
        return $this->language;
    }

Usage Example

示例#1
0
 /**
  * Constructor method to instantiate the form object
  *
  * @param  string $action
  * @param  string $method
  * @return self
  */
 public function __construct($action = null, $method = 'post')
 {
     $lang = isset($_GET['lang']) ? $_GET['lang'] : 'en_US';
     if (!defined('POP_LANG')) {
         define('POP_LANG', $lang);
     }
     $this->i18n = I18n::factory();
     $this->i18n->loadFile(__DIR__ . '/../../../data/assets/i18n/' . $this->i18n->getLanguage() . '.xml');
     $this->initFieldsValues = $this->getInitFields();
     parent::__construct($action, $method, null, '        ');
     $this->setAttributes('id', 'install-form');
 }
All Usage Examples Of Pop\I18n\I18n::getLanguage