Logo Search packages:      
Sourcecode: zope-cps-translationservice version File versions  Download package

def TranslationService::PlacefulTranslationService::PlacefulTranslationService::getDomain (   self,
  domain 
)

Get the domain for the passed domain name.

Definition at line 159 of file PlacefulTranslationService.py.

00159                                :
        """Get the domain for the passed domain name."""

        # We have to lookup a message catalog in the ZODB but
        # cache some stuff otherwise things are going to be slow.
        cache = getKeyCache(self, TS_DOMAIN_CACHE_KEY)

        if domain in cache:
            return cache[domain]

        dom = self._getDomain(domain)
        if dom is None:
            # Use default if available
            dom = cache.get(None)
            if dom is None:
                dom = self._getDomain(None)
        if dom is None:
            dom = DummyDomain(domain)

        cache[domain] = dom
        return dom


    security.declareProtected(View, 'translate')
    def translate(self, domain, *args, **kw):


Generated by  Doxygen 1.6.0   Back to index