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

def Localizer::LocalPropertyManager::LocalPropertyManager::getLocalAttribute (   self,
  id,
  lang = None 
)

Returns a local property

Definition at line 256 of file LocalPropertyManager.py.

00256                                               :
        """Returns a local property"""
        try:
            property = self._local_properties[id]
        except KeyError:
            return ''  # What should be returned here??

        # No language, look for the first non-empty available version
        if lang is None:
            lang = self.get_selected_language(property=id)

        try:
            return property[lang]
        except KeyError:
            return ''   # What should be returned here??


    # For backwards compatibility (<= 0.8.0)
    getLocalProperty = getLocalAttribute


Generated by  Doxygen 1.6.0   Back to index