# Copyright (c) 2008 gocept gmbh & co. kg
# See also LICENSE.txt
# $Id: interfaces.py 11045 2008-04-10 12:37:54Z thomas $

import zope.interface


class ITranslation(zope.interface.Interface):
    """Provide translation of objects with schemas.

    Translated objects are stored as annotations of the objects to be
    translated. They may be modified.

    Translated schemas have to have a tagged value 'clsid' for identifying it
    uniquely.

    """

    def translate(obj, schema, lang=None, translation_context=None):
        """Return an object that provides the schema and has translated
        attribute values.

        Either lang or translation_context must be given.

        """

    def interface(schema, lang=None, translation_context=None):
        """Return a schema that can adapt objects to a version translated into
        a specific language.

        Either lang or translation_context must be given.

        """
