Paginator: currentURL always return an URL without / at the end
[AOOS.git] / tmp / translatebox.php
blobf0fe4f50580fa63bf8aa0165b11283f796738181
1 <?php
2 if (isset($_POST["stringname"]) && isset($_POST["translation"]))
4 $c = file_get_contents("lang.php");
5 $c = split("\n", $c);
6 print_r($c);
7 $l = array_search("?>", $c);
8 $c[$l] = '$lang["en"]["'.$_POST["stringname"].'"] = "'.$_POST["translation"].'";';
9 $c[] = "?>";
10 $str = implode("\n", $c);
12 $f = fopen("lang.php", "w");
13 fwrite($f, $str);
14 fclose($f);
16 else{
17 print '
18 <div class="translatebox">
19 <form method="post">
20 String name: <input type="text" name="stringname" /> Translated string: <input type="text" name="translation" /><input type="submit" value="Translate!" />
21 </form>
22 </div>';