First working version of the AJAX translation client.

This commit is contained in:
bjorn
2008-08-15 11:14:13 +00:00
parent 0ce04f1a6e
commit 08fae303df
4 changed files with 94 additions and 9 deletions

View File

@@ -42,8 +42,8 @@ cgiMain pgf =
mfrom <- getLang pgf "from"
mto <- getLang pgf "to"
outputJSON $ translate pgf input mcat mfrom mto
"/cats" -> outputJSON $ categories pgf
"/langs" -> outputJSON $ languages pgf
"/categories" -> outputJSON $ categories pgf
"/languages" -> outputJSON $ languages pgf
_ -> outputNotFound path
getCat :: PGF -> String -> CGI (Maybe Category)