public function loadDictionary($lang = null)
{
if (!is_string($lang) && !is_null($lang)) {
throw new \InvalidArgumentException("Please provide a string as parameter!");
} else {
// if nothing is set, get it from the config file
if (is_null($lang)) {
$lang = $this->config->value('language');
}
$file_to_load = $this->language_folder . $lang . '.php';
return $this->loadFile($file_to_load);
}
}