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

getDeletableLanguages.py

##parameters=
##title=Return deletable languages

lang_names = context.portal_languages.getAvailableLanguages()
translations = context.getNonCanonicalTranslations()

# Return tuples of lang id and lang name
languages = [(lang, lang_names[lang]) for lang in translations.keys()]

def lcmp(x, y):
    return cmp(x[1], y[1])

languages.sort(lcmp)
return languages

Generated by  Doxygen 1.6.0   Back to index