Subversion Repositories navi

Rev

Rev 146 | Rev 158 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

import parse
import dbconnector
def translatesent(sent, lang):
    sent = parse.parsesent(sent)
    for word in sent:
        if word["word"]["id"] != 0:
            word["translated"] = dbconnector.translate(word["word"]["id"],lang)
        else:
            word["translated"] = word["word"]["navi"]
    return sent