2 if (isset($_POST["stringname"]) && isset($_POST["translation"]))
4 $c = file_get_contents("lang.php");
7 $l = array_search("?>", $c);
8 $c[$l] = '$lang["en"]["'.$_POST["stringname"].'"] = "'.$_POST["translation"].'";';
10 $str = implode("\n", $c);
12 $f = fopen("lang.php", "w");
18 <div class="translatebox">
20 String name: <input type="text" name="stringname" /> Translated string: <input type="text" name="translation" /><input type="submit" value="Translate!" />