Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
PlacelessTranslationService.Negotiator.CookieAccept Class Reference

List of all members.

Public Member Functions

def __init__
def getAccepted

Static Public Attributes

tuple filters = (str_lower, lang_normalize, str_strip)

Detailed Description

Definition at line 138 of file Negotiator.py.


Constructor & Destructor Documentation

Definition at line 141 of file Negotiator.py.

00141 
00142     def __init__(self, request):
00143         pass


Member Function Documentation

def PlacelessTranslationService.Negotiator.CookieAccept.getAccepted (   self,
  request,
  kind = 'language' 
)

Definition at line 144 of file Negotiator.py.

00144 
00145     def getAccepted(self, request, kind='language'):
00146         if not hasattr(request, 'cookies'):
00147             return ()
00148         language = request.cookies.get('pts_language', None)
00149         if language:
00150             if type(language) is types.TupleType:
00151                 return language
00152             else:
00153                 #filter
00154                 for filter in self.filters:
00155                     language = filter(language)
00156                 return (language,)
00157         else:
00158             return ()


Member Data Documentation

Definition at line 139 of file Negotiator.py.


The documentation for this class was generated from the following file: