private function readDictionaryJSON($filename)
{
$definitionFile = $filename . '.definition.json';
assert('file_exists($definitionFile)');
$fileContent = file_get_contents($definitionFile);
$lang = json_decode($fileContent, true);
if (empty($lang)) {
\SimpleSAML\Logger::error('Invalid dictionary definition file [' . $definitionFile . ']');
return array();
}
$translationFile = $filename . '.translation.json';
if (file_exists($translationFile)) {
$fileContent = file_get_contents($translationFile);
$moreTrans = json_decode($fileContent, true);
if (!empty($moreTrans)) {
$lang = array_merge_recursive($lang, $moreTrans);
}
}
return $lang;
}