Example #1
0
def prepare(desc, language=None):
    """Prepare to perform translation

    TODO - support language
    """

    # create the result
    prepared = {}

    # iterate on the description
    for k in desc:
        # get the translation
        trans = cache.codeTableFind(desc[k], language)

        # build the prepared
        prepared[k] = {"name": desc[k], "trans": trans}

    # return the prepared translation
    return prepared
Example #2
0
def getTranslation(table, language = None):
    """Get the translation data for a table"""

    return cache.codeTableFind(table, language)