protected function useLanguage()
    {
        $this->language = Utility::get($this->params, "language");
        if ($this->language!==null) {
            if (gettype($this->language)=="string") {
                $languageFile = $this->getWidgetFolder()
                    ."/languages/"
                    .Utility::getClassName($this)
                    ."."
                    .strtolower($this->language)
                    .".json";
                if (is_file($languageFile)) {
                    $this->languageMap = json_decode(
                        file_get_contents($languageFile),
                        true
                    );
                } else {
                    throw new \Exception("Could not load [$this->language] language file.");
                }
            } else {
                $this->languageMap = $this->language;
            }
        }
    }
protected function useLanguage()
    {
        $this->language = Utility::get($this->params, "language");
        if ($this->language!==null) {
            if (gettype($this->language)=="string") {
                $languageFile = $this->getWidgetFolder()
                    ."/languages/"
                    .Utility::getClassName($this)
                    ."."
                    .strtolower($this->language)
                    .".json";
                if (is_file($languageFile)) {
                    $this->languageMap = json_decode(
                        file_get_contents($languageFile),
                        true
                    );
                } else {
                    throw new \Exception("Could not load [$this->language] language file.");
                }
            } else {
                $this->languageMap = $this->language;
            }
        }
    }
protected function useLanguage ( ) { $ this -> language = Utility :: get ( $ this -> params , "language" ) ; if ( $ this -> language !== null ) { if ( gettype ( $ this -> language ) == "string" ) { $ languageFile = $ this -> getWidgetFolder ( ) . "/languages/" . Utility :: getClassName ( $ this ) . "." . strtolower ( $ this -> language ) . ".json" ; if ( is_file ( $ languageFile ) ) { $ this -> languageMap = json_decode ( file_get_contents ( $ languageFile ) , true ) ; } else { throw new \ Exception ( "Could not load [$this->language] language file." ) ; } } else { $ this -> languageMap = $ this -> language ; } } }
Register using language settings for widget

@return null
Register using language settings for widget