public function setLang($lang = '')
    {
        if (gettype($lang) === 'string') {
            $this->lang = $lang;
        } else {
            $msg = "The lang argument must be a string, '" . gettype($lang) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setLang($lang = '')
    {
        if (gettype($lang) === 'string') {
            $this->lang = $lang;
        } else {
            $msg = "The lang argument must be a string, '" . gettype($lang) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setLang ( $ lang = '' ) { if ( gettype ( $ lang ) === 'string' ) { $ this -> lang = $ lang ; } else { $ msg = "The lang argument must be a string, '" . gettype ( $ lang ) . "' given." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the language code.

@param string $lang A language code.
@throws \InvalidArgumentException If $lang is not a string.
Set the language code .