$row["name"], "description" => $row["description"]];
},
function ($value)
{
$output = "";
if ($value["name"] != null) $output .= (mark($value["name"], ["grammarterm"]) . ": ");
if ($value["description"] != null) $output .= ($value["description"]);
return $output;
}
),
/*
new class_column
(
"Cognates",
function ($row)
{
return $row["cognates"];
},
function ($value)
{
return implode(", ", array_map(function ($entry) {return ($entry["language"] . ": " . mark($entry["affix"], ["word", "lang_" . $entry["language"]]));}, $value));
}
),
*/
new class_column
(
"Example",
function ($row)
{
return $row["example"];
},
function ($value)
{
global $configuration;
$from = mark($value["word"], ["word", "lang_fs"]);
$to = implode
(
", ",
array_map
(
function ($word)
{
global $configuration;
return mark($word, ["word", "lang_" . $configuration["target"]]);
},
$value["translations"][$configuration["target"]]
)
);
return ($from . " ~ " . $to);
}
),
],
read_json("source/data/word_functions.json")
);
$table->generate();
?>
Some complex examples:
- unmanlikhed ~ inhumanity
- seberenung ~ visualization
- kraftigenar ~ fortifier