var cmn=require("../$common.js"), fs=require("fs"); var translations; module.exports=function(app,io,moddir){ translations=eval(String(fs.readFileSync(moddir+"/English-Dutch-mistranslations.json"))); app.get("/nlen",function(req,res){ var translation=translations[+new Date()/60000%translations.length|0]; //new translation each minute res.set('Content-Type', 'text/html'); res.send( String(fs.readFileSync(moddir+"/nlen.html")) .replace("",cmn.simpleHTMLescape(translation.nl)) .replace("",cmn.simpleHTMLescape(translation.en)) ); }); };