from zope.interface import implements from Products.MetadataPortal.interfaces import IVocabulary class LanguageVocabulary(object): implements(IVocabulary) langs = [ {'id':'et', 't':'et'}, {'id':'en', 't':'en'}, {'id':'ru', 't':'ru'}, {'id':'fi', 't':'fi'}, {'id':'de', 't':'de'} ] def treeLike(self): return False def restricts(self): return True def getMain(self): return self.langs def getVocabulary(self, typeID, fieldname): return [ l.values() for l in self.langs ] langVoc = LanguageVocabulary()