From: Plone S. <ps...@us...> - 2004-09-11 04:48:41
|
Update of /cvsroot/collective/I18NLayer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8592 Modified Files: Tag: PloneSolutions I18NBaseObject.py Log Message: Only choose language from the supported languages Index: I18NBaseObject.py =================================================================== RCS file: /cvsroot/collective/I18NLayer/Attic/I18NBaseObject.py,v retrieving revision 1.1.4.8 retrieving revision 1.1.4.9 diff -u -d -r1.1.4.8 -r1.1.4.9 --- I18NBaseObject.py 16 Jun 2004 14:31:53 -0000 1.1.4.8 +++ I18NBaseObject.py 10 Sep 2004 08:18:50 -0000 1.1.4.9 @@ -171,5 +171,11 @@ if len(result) == 0 : result.insert(0, ('None', 'None')) return DisplayList(result) + + def languages(self): + langtool = getToolByName(self, 'portal_languages', None) + if langtool: + return DisplayList(langtool.listSupportedLanguages()) + return [] InitializeClass(I18NBaseObject) |