<?php
	global $configuration;
	include_once("source/logic/server/data.php");
	include_once("source/logic/server/table.php");
	include_once("source/logic/server/misc.php");
 ?>
<section class="section" id="phonology_and_orthography">
	<header>Phonology and Orthography</header>
	<!--
	<p>Folksprak uses the following characters as letters:</pa>
	  -->
	<!--
	<div class="note_information">It was not easy to find a phonology system for Folksprak.</div>
	  -->
<?php
	$table = new class_table
	(
		[
			new class_column
			(
				"IPA-sound",
				function ($row)
				{
					return $row["ipa"];
				},
				function ($value)
				{
					return format($value);
				}
			),
			/*
			new class_column
			(
				"Type",
				function ($row)
				{
					return $row["type"];
				}
			),
			 */
			new class_column
			(
				"Latin letter Representation",
				function ($row)
				{
					return $row["latin"];
				},
				function ($value)
				{
					return format($value, ["letter", "lang_fs"]);
				}
			),
			new class_column
			(
				"Runic Representation",
				function ($row)
				{
					return $row["runic"];
				},
				function ($value)
				{
					return format($value, ["letter", "lang_fs", "runic"]);
				}
			),
			new class_column
			(
				$configuration["languagemap"]["fs"] . " Example",
				function ($row)
				{
					return $row["examples"]["fs"];
				},
				function ($value)
				{
					return format($value, ["word", "lang_fs"]);
				}
			),
			new class_column
			(
				$configuration["languagemap"][$configuration["target"]] . " Example",
				function ($row) use (&$configuration)
				{
					return $row["examples"][$configuration["target"]];
				},
				function ($value) use (&$configuration)
				{
					return format($value, ["word", "lang_" . $configuration["target"]]);
				}
			),
			/*
			new class_column
			(
				"Remark",
				function ($row)
				{
					return $row["remark"];
				},
				function ($value)
				{
					return format($value);
				}
			),
			 */
		],
		read_json("source/data/phonology_and_orthography.json")
	);
	$table->generate();
 ?>
 	<div class="note_information">It is permitted to pronounce the sounds a little differently, for example <span class="letter lang_fs">v</span> as <span class="ipa">ʋ</span> or <span class="letter lang_fs">s</span> as <span class="ipa">z</span>, whilst the sounds from the table above are the default.</div>
	<div class="note_warning">The runic writing is not meant to be used in regular texts. Use it only for purposes like art, etc.!</div>
</section>