Logo Search packages:      
Sourcecode: zope-linguaplone version File versions

def zope-linguaplone-0.7::I18NBaseObject::I18NBaseObject::getTranslations (   self  ) 

Return a dict of {lang : [object, wf_state]}, pass on to layer

Definition at line 119 of file I18NBaseObject.py.

00119                              :
        """Return a dict of {lang : [object, wf_state]}, pass on to layer"""
        if self.isCanonical():

            if CACHE_TRANSLATIONS and getattr(self, '_v_translations', None):
                return self._v_translations

            result = {}
            wftool = getToolByName(self, 'portal_workflow')
            result[self.getLanguage()] = [self, wftool.getInfoFor(self, 'review_state', None)]
            for obj in self.getBRefs(RELATIONSHIP):
                lang = obj.getLanguage()
                result[lang] = [obj, wftool.getInfoFor(obj, 'review_state')]

            if CACHE_TRANSLATIONS:
                self._v_translations = result

            return result
            return self.getCanonical().getTranslations()
    security.declareProtected(View, 'getNonCanonicalTranslations')
    def getNonCanonicalTranslations(self):

Generated by  Doxygen 1.6.0   Back to index