git.schokokeks.org
Repositories
Help
Report an Issue
fs-draft.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
d42abfa
Branches
Tags
master
midgard
vorlage
fs-draft.git
source
structure
personal_pronouns.html.php
advanced
fenris
commited
d42abfa
at 2016-04-23 01:33:44
personal_pronouns.html.php
Blame
History
Raw
<?php global $configuration; include_once("source/logic/server/data.php"); function convert_numerus($numerus) { switch ($numerus) { case 0: { return NULL; break; } case 1: { return "singular"; break; } case 2: { return "plural"; break; } default: { throw ("invalid"); break; } } } function convert_persona($persona) { switch ($persona) { case 0: { return "impersonal"; break; } case 1: { return "1st person"; break; } case 2: { return "2nd person"; break; } case 3: { return "3rd person"; break; } default: { throw ("invalid"); break; } } } function convert_genus($genus) { switch ($genus) { case 0: { return "common"; break; } case 1: { return "masculine"; break; } case 2: { return "feminine"; break; } case 3: { return "neuter"; break; } default: { throw ("invalid"); break; } } } ?> <section class="subsection" id="grammar/pronouns/personal_pronouns"> <header>Personal Pronouns</header> <table> <thead> <tr> <th>Case</th> <th><?php echo($configuration["languagemap"]["fs"]); ?></th> <th><?php echo($configuration["languagemap"][$configuration["target"]]); ?></th> </tr> </thead> <tbody> <?php $data_personal_pronouns = read_json("source/data/personal_pronouns.json"); foreach ($data_personal_pronouns as $entry) { $entry_desc = implode( " / ", [ convert_persona($entry["persona"]), convert_numerus($entry["numerus"]), convert_genus($entry["genus"]), ] ); $entry_fs = implode(", ", array_map(function ($word) {return ('<span class="word_fs">' . $word . '</span>');}, $entry["fs"])); $entry_en = implode(", ", array_map(function ($word) {return ('<span class="word_otherlanguage">' . $word . '</span>');}, $entry["en"])); ?> <tr> <td><?php echo($entry_desc); ?></td> <td><?php echo($entry_fs); ?></td> <td><?php echo($entry_en); ?></td> </tr> <?php } ?> </tbody> </table> <p>For the flected and otherwise related forms of the personal pronouns see the section <a href="#grammar/declension">Declension</a></p> </section>