8794e319de05611d80218f8a3f07fa1992d0c228
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/principles.html.php    1) <?php
source/content/principles.html.php    2) global $configuration;
source/content/principles.html.php    3) include_once("source/logic/server/data.php");
source/content/principles.html.php    4) include_once("source/logic/server/sql.php");
source/content/principles.html.php    5) include_once("source/logic/server/table.php");
source/content/principles.html.php    6)  ?>
bfadmin-master advanced

bfadmin-master authored 8 years ago

source/structure/principles.html.php  7) <section class="section" id="principles">
bfadmin-master advanced

bfadmin-master authored 8 years ago

source/structure/principles.html.php  8) 	<header>Principles</header>
Christian Fraß included developer-notes; a...

Christian Fraß authored 8 years ago

source/content/principles.html.php    9) 	<p>The word stock of Folksprak is &dash; with minor &dash; exceptions derived from the modern Germanic languages (e.g. English, German, Swedish, &#8230;) 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>
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/principles.html.php   10) 	<p>The following table gives an overview about the typical phoneme-transitions with example words in square brackets:</p>
source/content/principles.html.php   11) 	<span class="todo">more entries</span>
source/content/principles.html.php   12) <?php
source/content/principles.html.php   13) 	$data_transitions = read_json("source/data/transitions.json");
source/content/principles.html.php   14) 	
source/content/principles.html.php   15) 	$data = $data_transitions["data"];
source/content/principles.html.php   16) 	// $data = sql_select($data, function ($row) {return in_array($row["language_id"], ["pg","fs","en"]);});
source/content/principles.html.php   17) 	
source/content/principles.html.php   18) 	$table = new class_table
source/content/principles.html.php   19) 	(
source/content/principles.html.php   20) 		[
source/content/principles.html.php   21) 			new class_column("Transition", "transition_id"),
source/content/principles.html.php   22) 			new class_column("Language", "language_id"),
source/content/principles.html.php   23) 			new class_column("Phonemes", "phonemes"),
source/content/principles.html.php   24) 			new class_column("Examples", "examples"),
source/content/principles.html.php   25) 		],
source/content/principles.html.php   26) 		$data
source/content/principles.html.php   27) 	);
source/content/principles.html.php   28) 	
source/content/principles.html.php   29) 	$table->snap
source/content/principles.html.php   30) 	(
source/content/principles.html.php   31) 		[
source/content/principles.html.php   32) 			"label_vertical" => function ($column) {return "";},
source/content/principles.html.php   33) 			"columns_vertical" =>
source/content/principles.html.php   34) 			[
source/content/principles.html.php   35) 				$table->columns_get()[0],
source/content/principles.html.php   36) 			],
source/content/principles.html.php   37) 			"label_horizontal" => function ($column, $value) {return $value;},
source/content/principles.html.php   38) 			"columns_horizontal" =>
source/content/principles.html.php   39) 			[
source/content/principles.html.php   40) 				$table->columns_get()[1],
source/content/principles.html.php   41) 			],
source/content/principles.html.php   42) 			"columns_data" =>
source/content/principles.html.php   43) 			[
source/content/principles.html.php   44) 				$table->columns_get()[1],
source/content/principles.html.php   45) 				$table->columns_get()[2],
source/content/principles.html.php   46) 				$table->columns_get()[3],
source/content/principles.html.php   47) 			],
source/content/principles.html.php   48) 			"data_aggregator" => function ($values)
source/content/principles.html.php   49) 			{
source/content/principles.html.php   50) 				return $values;
source/content/principles.html.php   51) 			},
source/content/principles.html.php   52) 			"data_formatter" => function ($values)
source/content/principles.html.php   53) 			{
source/content/principles.html.php   54) 				if (count($values) == 1)
source/content/principles.html.php   55) 				{
source/content/principles.html.php   56) 					$phonemes = implode(
source/content/principles.html.php   57) 						", ",
source/content/principles.html.php   58) 						array_map
source/content/principles.html.php   59) 						(
source/content/principles.html.php   60) 							function ($phoneme) use (&$values)
source/content/principles.html.php   61) 							{
source/content/principles.html.php   62) 								return mark($phoneme, ["type_word", "lang_" . $values[0]["language_id"]]);
source/content/principles.html.php   63) 							},
source/content/principles.html.php   64) 							$values[0]["phonemes"]
source/content/principles.html.php   65) 						)
source/content/principles.html.php   66) 					);
source/content/principles.html.php   67) 					$examples = implode
source/content/principles.html.php   68) 					(
source/content/principles.html.php   69) 						", ",
source/content/principles.html.php   70) 						array_map
source/content/principles.html.php   71) 						(
source/content/principles.html.php   72) 							function ($word) use (&$values)
source/content/principles.html.php   73) 							{
source/content/principles.html.php   74) 								return mark($word, ["type_word", "lang_" . $values[0]["language_id"]]);
source/content/principles.html.php   75) 							},
source/content/principles.html.php   76) 							array_slice($values[0]["examples"], 0, 1)
source/content/principles.html.php   77) 						)
source/content/principles.html.php   78) 					);
source/content/principles.html.php   79) 					$output = $phonemes;
source/content/principles.html.php   80) 					if (count($values[0]["examples"]) > 0)
source/content/principles.html.php   81) 					{
source/content/principles.html.php   82) 						$break = true;
source/content/principles.html.php   83) 						$breaker = $break ? "<br/>" : " ";
source/content/principles.html.php   84) 						$output .= "${breaker}[${examples}]";
source/content/principles.html.php   85) 					}
source/content/principles.html.php   86) 					return $output;
source/content/principles.html.php   87) 				}
source/content/principles.html.php   88) 				else
source/content/principles.html.php   89) 				{
source/content/principles.html.php   90) 					return "?";
source/content/principles.html.php   91) 				}
source/content/principles.html.php   92) 			},
source/content/principles.html.php   93) 		]
source/content/principles.html.php   94) 	)->generate();
source/content/principles.html.php   95)  ?>