submittranslation.php 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. <!DOCTYPE html>
  2. <html>
  3. <meta charset="utf-8">
  4. <link rel="stylesheet" type="text/css" href="css/style.css">
  5. <head>
  6. <title>An African Language Short Story Competition</title>
  7. </head>
  8. <body>
  9. <ul>
  10. <li><a id="home" href="index.php">Home</a></li>
  11. <li><a id="original" href="submit.php">Original Story Submission</a></li>
  12. <li><a id="translation" class=active href="#">Translated Story Submission</a></li>
  13. <li><a id="stories" href="displaystories.php">Submitted Stories</a></li>
  14. <li><a id="statistics" href="submissionstatistics.php">Submissions per Language</a></li>
  15. <li><a id="coordinate" href="coordinator.php">Coordinator Application</a></li>
  16. <li><a id="contact" href="contact.php">Contact</a></li>
  17. <li><a id="resources" href="resources.php">Resources</a></li>
  18. <li><a id="flyers" href="flyers.php">Flyers</a></li>
  19. <li><a id="faq" href="faq.php">Frequently Asked Questions</a></li>
  20. <li><a id="privacy" href="privacy.php">Privacy</a></li>
  21. </ul>
  22. <header>
  23. <h1>Tuvute Pamoja
  24. <a href="https://deeplearningindaba.com">
  25. <img src="images/deeplearningindaba.svg" alt="Deeplearning Indaba" style="height:60px">
  26. </a></h1>
  27. </header>
  28. <?php include 'submitdatabaseinfo.php';?>
  29. <?php include 'submittranslationsetup.php';?>
  30. <h1 id="title">An African Language Short Story Competition</h1>
  31. <div>
  32. <h3 id="descriptiontitle">General Description</h3>
  33. <p id="descriptiontext1">Thank you for making a submission. Your translation should be suitable for people between the ages of 5 and 12 years old. The original stories draw some inspiration from the traditions and cultures of the group that uses that language, you may find some terms cannot be translated, in which case a short description can be used as well as the original term. Original stories are between 2000 and 2500 words, conciseness of languages differ, and explanations of terms may also be needed, so translations should be between 1500 and 3000 words. Prizes will be available for translated stories. Stories will be judged by those who have submitted a story or a translation in a language or language group. Stories with the highest scores will win prizes. A prize of $40 will be given to the translator of the best translated short story in each language. A prize of $40 will be given to the author of the best translated short story in each language. Translated stories will be evaluated on a 5 point scale on:</p>
  34. <ol>
  35. <li id="descriptiontext2">Grammar and spelling</li><br>
  36. <li id="descriptiontext3">Theme and plot</li><br>
  37. <li id="descriptiontext4">Style</li><br>
  38. <li id="descriptiontext5">Cultural knowledge gained</li><br>
  39. <li id="descriptiontext6">Overall impression</li><br>
  40. </ol>
  41. <p id="descriptiontext7">The average score will be used to rank stories, in case of a
  42. tie, the organizing committee will randomly choose one story to receive a prize.</p>
  43. </div>
  44. </section>
  45. <section>
  46. <div>
  47. <h3 id="furtherules">Further Rules</h3>
  48. <ol>
  49. <li id="furtherrulestext1">Entries will be evaluated anonymously, authors and translators may advertise the competition, and their entry in it, but should not advertise their authorship or translation of an article until winners are announced.</li><br>
  50. <li id="furtherrulestext2">All entries will be released under a creative commons attribution license that allows others to distribute, remix, adapt and build upon your work, even commercially, as
  51. long as they credit the authors for the original creation and translators for the translation. For more on this license see:</li><br><a href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</a><br>
  52. <li id="furtherrulestext3">You may choose to use a pseudonym.</li><br>
  53. <li id="furtherrulestext4">Should you win a prize and not wish to be identified, you may choose to have your earnings given to a charitable organization of your choice.</li><br>
  54. </ol>
  55. </div>
  56. </section>
  57. <section>
  58. <div>
  59. <form method="post" action="">
  60. <p>
  61. <label id="languagefromlabel" for="languagefrom">
  62. Select a language you would like to translate from
  63. </label>
  64. <span class="error">*</span><br>
  65. <span class="error"><?php echo $languagefromErr;?></span><br>
  66. <select class="language" id="languagefrom" name="languagefrom" onchange="getstorytitles()">
  67. <option data-language="" value="<?php echo $languagefrom;?>"><?php echo $originallanguagename;?></option>
  68. <option data-language="Amharic" value="amh">አማርኛ</option>
  69. <optgroup label="اَلْعَرَبِيَّةُ">
  70. <option data-language="Egyptian Arabic" value="arz">العامية المصرية</option>
  71. <option data-language="Standard Arabic" value="arb">العربية الفصحى</option>
  72. <option data-language="Sudanese Arabic" value="apd">لهجة سودانية</option>
  73. </optgroup>
  74. <option data-language="Afrikaans" value="afr">Afrikaans</option>
  75. <option data-language="Bangime" value="dba">Bangime</option>
  76. <option data-language="Basaa" value="bas">Basaa</option>
  77. <option data-language="Bemba" value="ben">Bemba</option>
  78. <option data-language="Chichewa" value="nya">Chichewa</option>
  79. <option data-language="Dagbani" value="dag">Dagbani</option>
  80. <option data-language="Dholuo" value="luo">Dholuo</option>
  81. <optgroup label="Dogon">
  82. <option data-language="Ben Tey Dogon" value="BTD">Ben Tey Dogon</option>
  83. <option data-language="Najamba-Kindige" value="N-K">Najamba-Kindige</option>
  84. </optgroup>
  85. <option data-language="Douala" value="dua">Douala</option>
  86. <option data-language="Ewondo" value="ewo">Ewondo</option>
  87. <option data-language="Fefe" value="fmp">Féfé</option>
  88. <optgroup label="Fulfulde">
  89. <option data-language="Adamawa Fulfulde" value="fub">Adamawa Fulfulde</option>
  90. <option data-language="Bagirmi Fulfulde" value="fui">Bagirmi Fulfulde</option>
  91. <option data-language="Borgu Fulfulde" value="fue">Borgu Fulfulde</option>
  92. <option data-language="Central Eastern Niger Fulfulde" value="fuq">Central Eastern Niger Fulfulde</option>
  93. <option data-language="Maasina Fulfulde" value="ffm">Maasina Fulfulde</option>
  94. <option data-language="Nigerian Fulfulde" value="fuv">Nigerian Fulfulde</option>
  95. <option data-language="Pulaar" value="fuc">Pulaar</option>
  96. <option data-language="Pular" value="fuf">Pular</option>
  97. <option data-language="Western Niger Fulfulde" value="fuh">Western Niger Fulfulde</option>
  98. </optgroup>
  99. <option data-language="Ga" value="gaa">Ga</option>
  100. <option data-language="Ghomala" value="gho">Ghomala</option>
  101. <option data-language="Kikuyu" value="kik">Gĩkũyũ</option>
  102. <option data-language="Gonja" value="gjn">Gonja</option>
  103. <option data-language="Hausa" value="hau">Hausa</option>
  104. <option data-language="Igbo" value="ibo">Igbo</option>
  105. <optgroup label="Ndebele">
  106. <option data-language="IsiNdebele saseNyakatho" value="nde">IsiNdebele saseNyakatho</option>
  107. <option data-language="IsiNdebele seSewula" value="nbl">IsiNdebele seSewula</option>
  108. </optgroup>
  109. <option data-language="Xhosa" value="xho">isiXhosa</option>
  110. <option data-language="Zulu" value="zul">isiZulu</option>
  111. <optgroup label="Jóola">
  112. <option data-language="Bandial" value="bqj">Bandial</option>
  113. <option data-language="Karon" value="krx">Karon</option>
  114. </optgroup>
  115. <optgroup label="Kamba">
  116. <option data-language="Dhaiso" value="dhs">Dhaiso</option>
  117. <option data-language="Kamba" value="kam">Kamba</option>
  118. </optgroup>
  119. <option data-language="Kidawida" value="dav">Kidawida</option>
  120. <option data-language="Kigiriyama" value="nyf">Kigiriyama</option>
  121. <optgroup label="Kimeru (Kenya)">
  122. <option data-language="Kimeru" value="mer">Meru</option>
  123. <option data-language="Tharaka" value="thk">Tharaka</option>
  124. <option data-language="Mwimbi-Muthambi" value="mws">Mwimbi-Muthambi</option>
  125. <option data-language="Cuka" value="cuh">Cuka</option>
  126. </optgroup>
  127. <option data-language="Kinyarwanda" value="kin">Kinyarwanda</option>
  128. <option data-language="Kipsigis" value="sgc">Kipsigis</option>
  129. <option data-language="Kiswahili" value="swa">Kiswahili</option>
  130. <option data-language="Kom" value="bkm">Kom</option>
  131. <option data-language="Konkomba" value="xon">Konkomba</option>
  132. <option data-language="Lingala" value="lin">Lingala</option>
  133. <option data-language="Luganda" value="lug">Luganda</option>
  134. <optgroup label="Luhya">
  135. <option data-language="Lubukusu" value="bsk">Lubukusu</option>
  136. <option data-language="Luidhako" value="ida">Luidhako</option>
  137. <option data-language="Lulogoli" value="rag">Lulogoli</option>
  138. <option data-language="Lukabrasi" value="lkb">Lukabrasi</option>
  139. <option data-language="Lunyala" value="nle">Lunyala</option>
  140. <option data-language="Lusamia" value="lsm">Lusamia</option>
  141. <option data-language="Lutachoni" value="lts">Lutachoni</option>
  142. <option data-language="Olukhayo" value="lko">Olukhayo</option>
  143. <option data-language="Olukisa" value="lks">Olukisa</option>
  144. <option data-language="Olumarama" value="lrm">Olumarama</option>
  145. <option data-language="Olunyole" value="nyd">Olunyole</option>
  146. <option data-language="Olutsotso" value="lto">Olutsotso</option>
  147. <option data-language="Oluwanga" value="lwa">Oluwanga</option>
  148. </optgroup>
  149. <option data-language="Medumba" value="byv">Medumba</option>
  150. <option data-language="Mende" value="men">Mende</option>
  151. <optgroup label="Meru (Tanzania)">
  152. <option data-language="Machame" value="imc">Machame</option>
  153. <option data-language="Rwa" value="rwk">Rwa</option>
  154. </optgroup>
  155. <option data-language="Nda\'nda\'" value="nnz">Nda'nda'</option>
  156. <option data-language="Ngiemboon" value="nnh">Ngiemboon</option>
  157. <option data-language="Nigerian Pidgin" value="pcm">Nigerian Pidgin</option>
  158. <option data-language="Nuasue" value="yav">Nuasue</option>
  159. <option data-language="Ŋgə̂mbà" value="nge">Ŋgə̂mbà</option>
  160. <option data-language="Runyakitara" value="213">Runyakitara</option>
  161. <option data-language="Safaliba" value="saf">Safaliba</option>
  162. <optgroup label="Sena">
  163. <option data-language="Barwe" value="bwg">Barwe</option>
  164. <option data-language="Malawian Sena" value="swk">Malawian Sena</option>
  165. <option data-language="Mozambiquean Sena" value="seh">Mozambiquean Sena</option>
  166. </optgroup>
  167. <option data-language="Sesotho" value="sot">Sesotho</option>
  168. <option data-language="Setswana" value="tsn">Setswana</option>
  169. <option data-language="Shü Pamom" value="bax">Shü Pamom</option>
  170. <option data-language="siSwati" value="ssw">siSwati</option>
  171. <option data-language="Twi" value="twi">Twi</option>
  172. <option data-language="Urhobo" value="urh">Urhobo</option>
  173. <option data-language="Wolaytta" value="wal">Wolaytta</option>
  174. <option data-language="Wolof" value="wol">Wolof</option>
  175. <option data-language="Xitsonga" value="tso">Xitsonga</option>
  176. <option data-language="Yambeta" value="yat">Yambeta</option>
  177. <option data-language="Yoruba" value="yor">Yorùbá</option>
  178. <option data-language="Zarma" value="dje">Zarma</option>
  179. </select>
  180. </p>
  181. <table id="titles" ></table>
  182. <p>You have translated the story:</p>
  183. <p>
  184. <textarea id="originalidstring" type="text" name="originaltitle" maxlength="100" style="width:750px" rows="1" readonly><?php echo $originaltitle;?></textarea><br>
  185. </p>
  186. <input id="originalid" name="originalid" type="hidden" value="<?php echo $originalid;?>"></input>
  187. <label id="languagetolabel" for="languageto">Select the language you have translated to </label>
  188. <span class="error">*</span><br>
  189. <span class="error"><?php echo $languagetoErr;?></span><br>
  190. <select class="language" id="languageto" name="languageto">
  191. <option data-language="" value="<?php echo $languageto;?>"><?php echo $translatedlanguagename;?></option>
  192. <option data-language="Amharic" value="amh">አማርኛ</option>
  193. <optgroup label="ﺎَﻠْﻋَﺮَﺒِﻳَّﺓُ">
  194. <option data-language="Egyptian Arabic" value="arz">ﺎﻠﻋﺎﻤﻳﺓ ﺎﻠﻤﺻﺮﻳﺓ</option>
  195. <option data-language="Standard Arabic" value="arb">ﺎﻠﻋﺮﺒﻳﺓ ﺎﻠﻔﺼﺣﻯ</option>
  196. <option data-language="Sudanese Arabic" value="apd">ﻞﻬﺟﺓ ﺱﻭﺩﺎﻨﻳﺓ</option>
  197. </optgroup>
  198. <option data-language="Afrikaans" value="afr">Afrikaans</option>
  199. <option data-language="Bangime" value="dba">Bangime</option>
  200. <option data-language="Basaa" value="bas">Basaa</option>
  201. <option data-language="Bemba" value="ben">Bemba</option>
  202. <option data-language="Chichewa" value="nya">Chichewa</option>
  203. <option data-language="Dagbani" value="dag">Dagbani</option>
  204. <option data-language="Dholuo" value="luo">Dholuo</option>
  205. <optgroup label="Dogon">
  206. <option data-language="Ben Tey Dogon" value="BTD">Ben Tey Dogon</option>
  207. <option data-language="Najamba-Kindige" value="N-K">Najamba-Kindige</option>
  208. </optgroup>
  209. <option data-language="Douala" value="dua">Douala</option>
  210. <option data-language="Ewondo" value="ewo">Ewondo</option>
  211. <option data-language="Fefe" value="fmp">Féfé</option>
  212. <optgroup label="Fulfulde">
  213. <option data-language="Adamawa Fulfulde" value="fub">Adamawa Fulfulde</option>
  214. <option data-language="Bagirmi Fulfulde" value="fui">Bagirmi Fulfulde</option>
  215. <option data-language="Borgu Fulfulde" value="fue">Borgu Fulfulde</option>
  216. <option data-language="Central Eastern Niger Fulfulde" value="fuq">Central Eastern Niger Fulfulde</option>
  217. <option data-language="Maasina Fulfulde" value="ffm">Maasina Fulfulde</option>
  218. <option data-language="Nigerian Fulfulde" value="fuv">Nigerian Fulfulde</option>
  219. <option data-language="Pulaar" value="fuc">Pulaar</option>
  220. <option data-language="Pular" value="fuf">Pular</option>
  221. <option data-language="Western Niger Fulfulde" value="fuh">Western Niger Fulfulde</option>
  222. </optgroup>
  223. <option data-language="Ga" value="gaa">Ga</option>
  224. <option data-language="Ghomala" value="gho">Ghomala</option>
  225. <option data-language="Kikuyu" value="kik">Gĩkũyũ</option>
  226. <option data-language="Gonja" value="gjn">Gonja</option>
  227. <option data-language="Hausa" value="hau">Hausa</option>
  228. <option data-language="Igbo" value="ibo">Igbo</option>
  229. <optgroup label="Ndebele">
  230. <option data-language="IsiNdebele saseNyakatho" value="nde">IsiNdebele saseNyakatho</option>
  231. <option data-language="IsiNdebele seSewula" value="nbl">IsiNdebele seSewula</option>
  232. </optgroup>
  233. <option data-language="Xhosa" value="xho">isiXhosa</option>
  234. <option data-language="Zulu" value="zul">isiZulu</option>
  235. <optgroup label="Jóola">
  236. <option data-language="Bandial" value="bqj">Bandial</option>
  237. <option data-language="Karon" value="krx">Karon</option>
  238. </optgroup>
  239. <optgroup label="Kamba">
  240. <option data-language="Dhaiso" value="dhs">Dhaiso</option>
  241. <option data-language="Kamba" value="kam">Kamba</option>
  242. </optgroup>
  243. <option data-language="Kidawida" value="dav">Kidawida</option>
  244. <option data-language="Kigiriyama" value="nyf">Kigiriyama</option>
  245. <optgroup label="Kimeru (Kenya)">
  246. <option data-language="Kimeru" value="mer">Meru</option>
  247. <option data-language="Tharaka" value="thk">Tharaka</option>
  248. <option data-language="Mwimbi-Muthambi" value="mws">Mwimbi-Muthambi</option>
  249. <option data-language="Cuka" value="cuh">Cuka</option>
  250. </optgroup>
  251. <option data-language="Kinyarwanda" value="kin">Kinyarwanda</option>
  252. <option data-language="Kipsigis" value="sgc">Kipsigis</option>
  253. <option data-language="Kiswahili" value="swa">Kiswahili</option>
  254. <option data-language="Kom" value="bkm">Kom</option>
  255. <option data-language="Konkomba" value="xon">Konkomba</option>
  256. <option data-language="Lingala" value="lin">Lingala</option>
  257. <option data-language="Luganda" value="lug">Luganda</option>
  258. <optgroup label="Luhya">
  259. <option data-language="Lubukusu" value="bsk">Lubukusu</option>
  260. <option data-language="Luidhako" value="ida">Luidhako</option>
  261. <option data-language="Lulogoli" value="rag">Lulogoli</option>
  262. <option data-language="Lukabrasi" value="lkb">Lukabrasi</option>
  263. <option data-language="Lunyala" value="nle">Lunyala</option>
  264. <option data-language="Lusamia" value="lsm">Lusamia</option>
  265. <option data-language="Lutachoni" value="lts">Lutachoni</option>
  266. <option data-language="Olukhayo" value="lko">Olukhayo</option>
  267. <option data-language="Olukisa" value="lks">Olukisa</option>
  268. <option data-language="Olumarama" value="lrm">Olumarama</option>
  269. <option data-language="Olunyole" value="nyd">Olunyole</option>
  270. <option data-language="Olutsotso" value="lto">Olutsotso</option>
  271. <option data-language="Oluwanga" value="lwa">Oluwanga</option>
  272. </optgroup>
  273. <option data-language="Medumba" value="byv">Medumba</option>
  274. <option data-language="Mende" value="men">Mende</option>
  275. <optgroup label="Meru (Tanzania)">
  276. <option data-language="Machame" value="imc">Machame</option>
  277. <option data-language="Rwa" value="rwk">Rwa</option>
  278. </optgroup>
  279. <option data-language="Nda\'nda\'" value="nnz">Nda'nda'</option>
  280. <option data-language="Ngiemboon" value="nnh">Ngiemboon</option>
  281. <option data-language="Nigerian Pidgin" value="pcm">Nigerian Pidgin</option>
  282. <option data-language="Nuasue" value="yav">Nuasue</option>
  283. <option data-language="Ŋgə̂mbà" value="nge">Ŋgə̂mbà</option>
  284. <option data-language="Runyakitara" value="213">Runyakitara</option>
  285. <option data-language="Safaliba" value="saf">Safaliba</option>
  286. <optgroup label="Sena">
  287. <option data-language="Barwe" value="bwg">Barwe</option>
  288. <option data-language="Malawian Sena" value="swk">Malawian Sena</option>
  289. <option data-language="Mozambiquean Sena" value="seh">Mozambiquean Sena</option>
  290. </optgroup>
  291. <option data-language="Sesotho" value="sot">Sesotho</option>
  292. <option data-language="Setswana" value="tsn">Setswana</option>
  293. <option data-language="Shü Pamom" value="bax">Shü Pamom</option>
  294. <option data-language="siSwati" value="ssw">siSwati</option>
  295. <option data-language="Twi" value="twi">Twi</option>
  296. <option data-language="Urhobo" value="urh">Urhobo</option>
  297. <option data-language="Wolaytta" value="wal">Wolaytta</option>
  298. <option data-language="Wolof" value="wol">Wolof</option>
  299. <option data-language="Xitsonga" value="tso">Xitsonga</option>
  300. <option data-language="Yambeta" value="yat">Yambeta</option>
  301. <option data-language="Yoruba" value="yor">Yorùbá</option>
  302. <option data-language="Zarma" value="dje">Zarma</option>
  303. </select>
  304. <p>
  305. <label id="namelabel" for="name">What is your name/pseudonym?</label>
  306. <span class="error">*</span><br>
  307. <span class="error"><?php echo $nameErr;?></span><br>
  308. <input id="name" type="text" name="name" style="width:375px" maxlength="100" value="<?php echo $name;?>"><br>
  309. </p>
  310. <p>
  311. <label id="legalpermissionlabel" for="legalpermission">Are you an adult in the region you live in, if not do you have permission from a parent or legal guardian to participate in this competition?</label>
  312. <span class="error">*</span><br>
  313. <span class="error"><?php echo $legalpermissionErr;?> </span><br>
  314. <select id="legalpermission" name="legalpermission">
  315. <option id="legalpermissionno" value="no">no</option>
  316. <option id="legalpermissionyes" value="yes">yes</option>
  317. </select>
  318. </p>
  319. <p>
  320. <label id="emaillabel" for="email">What is your e-mail address?</label>
  321. <span class="error">*</span><br>
  322. <span class="error"><?php echo $emailErr;?></span><br>
  323. <input type="email" id="email" name="email" style="width:375px" value="<?php echo $email;?>"><br>
  324. </p>
  325. <?php include 'gettelephone.php';?>
  326. <p>
  327. <label id="titlelabel" for="title">What is the title of your translated story</label>
  328. <span class="error">*</span><br>
  329. <span class="error"><?php echo $titleErr;?></span><br>
  330. <textarea id="title" type="text" name="title" maxlength="100" style="width:750px" rows="1"><?php echo $title;?></textarea><br>
  331. </p>
  332. <p>
  333. <label id="translatorlabel" for="translator">Are you the translator of this work, if you are not the translator do you have permission from the translator to submit the work on their behalf?</label>
  334. <span class="error">*</span><br>
  335. <span class="error"><?php echo $translatorErr;?></span><br>
  336. <select id="translator" name="translator">
  337. <option id="translatorno" value="no">no</option>
  338. <option id="translatoryes" value="yes">yes</option>
  339. </select>
  340. </p>
  341. <p>
  342. <label id="storylabel" for="story">Please enter the text for your translation here</label>
  343. <span class="error">*</span><br>
  344. <span class="error"><?php echo $storyErr;?></span><br>
  345. <textarea id="story" type="text" dir="ltr" name="story" size="30000" maxlength="30000" rows="25" style="width:750px"><?php echo $story;?></textarea><br>
  346. </p>
  347. <p>
  348. <button id="submit" type="submit" name="submit" value="submit">Submit</button>
  349. </p>
  350. </form>
  351. <p>
  352. <button id="wordcountbutton" onclick="wordcountinfo()">Update word count</button>
  353. </p>
  354. <h4 id="wordsentered">Words Entered:</h4>
  355. <h4 id="wordscounted">0</h4>
  356. </div>
  357. </section>
  358. <section>
  359. <div>
  360. <div id="keyboarddiv">
  361. <?php include "softkeyboard.php" ;?>
  362. </div>
  363. </div>
  364. </section>
  365. <?php include 'getlanguage.php';?>
  366. <?php include 'submittranslationsave.php';?>
  367. </body>
  368. <?php include 'footer.php';?>
  369. <script>
  370. function getstorytitles() {
  371. var lang = document.getElementById("languagefrom").value;
  372. //use ajax to get stories from database in that language
  373. var xmlhttp = new XMLHttpRequest();
  374. xmlhttp.onreadystatechange = function() {
  375. if (this.readyState == 4 && this.status == 200) {
  376. document.getElementById("titles").innerHTML = this.responseText;
  377. }
  378. };
  379. xmlhttp.open("GET","gettitlestotranslate.php?lang="+lang,true);
  380. xmlhttp.send();
  381. }
  382. function showtitle(storyid) {
  383. document.getElementById("originalidstring").innerHTML =
  384. document.getElementById(storyid.toString()).innerHTML;
  385. document.getElementById("originalid").value = storyid;
  386. document.getElementById("originalid").innerHTML = storyid;
  387. }
  388. function addcharacter(id) {
  389. var charin = document.getElementById(id).value;
  390. var character;
  391. var start;
  392. var end;
  393. //console.log(id);
  394. //console.log(charin);
  395. var text = document.getElementById("story").value;
  396. var input = document.getElementById("story");
  397. var cursorpos = input.selectionStart;
  398. // A slow but reliable entry method
  399. start = text.substring(0,cursorpos);
  400. end = text.substring(cursorpos,text.length);
  401. if (charin==="") {
  402. character="";
  403. }else if (id==="Backspace") {
  404. character="";
  405. start = start.substring(0,start.length-1);
  406. }else if ((id==="Enter")||(id==="Tab")){
  407. character = charin;
  408. }else{
  409. character = String.fromCharCode(charin);
  410. }
  411. //console.log(character);
  412. document.getElementById("story").value = start + character + end;
  413. }
  414. function shiftwrap() {
  415. var value = document.getElementById("keyboardtype").value;
  416. shift(value);
  417. }
  418. function changecasewrap() {
  419. var value = document.getElementById("keyboardtype").value;
  420. changecase(value);
  421. }
  422. function altgrwrap() {
  423. var value = document.getElementById("keyboardtype").value;
  424. altgr(value);
  425. }
  426. function keyboardwrap() {
  427. var value = document.getElementById("keyboardtype").value;
  428. keyboard(value);
  429. if(value==="ara") {
  430. document.getElementById("story").dir="rtl";
  431. }else{
  432. document.getElementById("story").dir="ltr";
  433. }
  434. }
  435. </script>
  436. <script type="text/javascript" src="js/afrikaanskeys.js"></script>
  437. <script type="text/javascript" src="js/akankeys.js"></script>
  438. <script type="text/javascript" src="js/amharickeys.js"></script>
  439. <script type="text/javascript" src="js/arabickeys.js"></script>
  440. <script type="text/javascript" src="js/bembakeys.js"></script>
  441. <script type="text/javascript" src="js/camerooniankeys.js"></script>
  442. <script type="text/javascript" src="js/dagbanikeys.js"></script>
  443. <script type="text/javascript" src="js/englishkeys.js"></script>
  444. <script type="text/javascript" src="js/ewekeys.js"></script>
  445. <script type="text/javascript" src="js/gakeys.js"></script>
  446. <script type="text/javascript" src="js/hausakeys.js"></script>
  447. <script type="text/javascript" src="js/igbokeys.js"></script>
  448. <script type="text/javascript" src="js/kikuyukeys.js"></script>
  449. <script type="text/javascript" src="js/lingalakeys.js"></script>
  450. <script type="text/javascript" src="js/lugandakeys.js"></script>
  451. <script type="text/javascript" src="js/malikeys.js"></script>
  452. <script type="text/javascript" src="js/sesothokeys.js"></script>
  453. <script type="text/javascript" src="js/togokeys.js"></script>
  454. <script type="text/javascript" src="js/wolofkeys.js"></script>
  455. <script type="text/javascript" src="js/yorubakeys.js"></script>
  456. <script type="text/javascript" src="js/keyboard.js"></script>
  457. <script type="text/javascript" src="js/wordcount.js"></script>
  458. </html>