<configure
    xmlns="http://namespaces.zope.org/zope"
    >

  <!-- BBB -->
  <include package="zope.i18n" />

  <!-- Register the Translation Domain as a content object -->
  <class class=".translationdomain.TranslationDomain">
    <factory
        id="zope.app.i18n.TranslationDomain"
        />
    <implements
        interface="zope.annotation.interfaces.IAttributeAnnotatable"
        />
    <allow
        interface="zope.i18n.interfaces.ITranslationDomain"
        />
    <require
        permission="zope.ManageSite"
        interface="zope.container.interfaces.IContainer"
        />
    <require
        permission="zope.ManageSite"
        interface=".interfaces.IWriteTranslationDomain"
        />
    <require
        permission="zope.ManageSite"
        interface=".interfaces.ISyncTranslationDomain"
        />
  </class>

  <subscriber
      for=".interfaces.ILocalTranslationDomain
           zope.component.interfaces.IRegistered"
      handler=".translationdomain.setDomainOnActivation"
      />

  <subscriber
      for=".interfaces.ILocalTranslationDomain
           zope.component.interfaces.IUnregistered"
      handler=".translationdomain.unsetDomainOnDeactivation"
      />

  <!-- Setup Message Catalogs -->
  <class class=".messagecatalog.MessageCatalog">
    <factory
        id="zope.app.MessageCatalog"
        />
    <implements
        interface="zope.annotation.interfaces.IAttributeAnnotatable"
        />
    <require
        permission="zope.View"
        interface="zope.i18n.interfaces.IMessageCatalog"
        />
    <require
        permission="zope.ManageSite"
        attributes="setMessage getMessageIds"
        />
  </class>

  <!-- Setup Export and Import Filters -->
  <adapter
      factory=".filters.GettextExportFilter"
      for=".interfaces.ILocalTranslationDomain"
      provides="zope.i18n.interfaces.IMessageExportFilter"
      />

  <adapter
      factory=".filters.GettextImportFilter"
      for=".interfaces.ILocalTranslationDomain"
      provides="zope.i18n.interfaces.IMessageImportFilter"
      />

  <include package=".xmlrpc" />
  <include package=".browser" />

</configure>
