def get_localizable_attributes(obj):
 locale = {}
 try:
  if obj.label:
   locale['label'] = obj.label
 except:
  pass
 try:
  if obj.description:
   locale['description'] = obj.description
 except:
  pass
 return locale

def get_localizable_attributes ( obj ) : locale = { } try : if obj . label : locale [ 'label' ] = obj . label except : pass try : if obj . description : locale [ 'description' ] = obj . description except : pass return locale
returns a dictionary with localizable attributes of obj .