git.schokokeks.org
Repositories
Help
Report an Issue
fs-draft.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
6e384e0
Branches
Tags
master
midgard
vorlage
fs-draft.git
source
content
principles.html.php
intermediate
Christian Fraß
commited
6e384e0
at 2017-04-13 19:26:23
principles.html.php
Blame
History
Raw
<?php global $configuration; include_once("source/logic/server/data.php"); include_once("source/logic/server/sql.php"); include_once("source/logic/server/table.php"); ?> <section class="section" id="principles"> <header>Principles</header> <p>The word stock of Folksprak is ‐ with minor exceptions ‐ derived from the modern Germanic languages (e.g. English, German, Swedish, …) and/or their precursors (e.g. Old English, Old Norse, Proto Germanic, etc.). However branches, which no longer emerge today (e.g. the East Germanic languages like Gothic), were not incorporated.</p> <p>The following table gives an overview about the typical phoneme-transitions with example words in square brackets:</p> <span class="todo">more entries</span> <?php $data_transitions = read_json("source/data/transitions.json"); $data = $data_transitions["data"]; // $data = sql_select($data, function ($row) {return in_array($row["language_id"], ["pg","fs","en"]);}); $table = new class_table ( [ new class_column("Transition", "transition_id"), new class_column("Language", "language_id"), new class_column("Phonemes", "phonemes"), new class_column("Examples", "examples"), ], $data ); $table->snap ( [ "label_vertical" => function ($column) {return "";}, "columns_vertical" => [ $table->columns_get()[0], ], "label_horizontal" => function ($column, $value) {return $value;}, "columns_horizontal" => [ $table->columns_get()[1], ], "columns_data" => [ $table->columns_get()[1], $table->columns_get()[2], $table->columns_get()[3], ], "data_aggregator" => function ($values) { return $values; }, "data_formatter" => function ($values) { if (count($values) == 1) { $phonemes = implode( ", ", array_map ( function ($phoneme) use (&$values) { return mark($phoneme, ["type_word", "lang_" . $values[0]["language_id"]]); }, $values[0]["phonemes"] ) ); $examples = implode ( ", ", array_map ( function ($word) use (&$values) { return mark($word, ["type_word", "lang_" . $values[0]["language_id"]]); }, array_slice($values[0]["examples"], 0, 1) ) ); $output = $phonemes; if (count($values[0]["examples"]) > 0) { $break = true; $breaker = $break ? "<br/>" : " "; $output .= "${breaker}[${examples}]"; } return $output; } else { return "?"; } }, ] )->generate(); ?> </section>