Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
plone.i18n.negotiator.cookie.CookieLanguage Class Reference

List of all members.

Public Member Functions

def __init__
def getPreferredLanguages

Public Attributes


Detailed Description

Definition at line 7 of file

Constructor & Destructor Documentation

Definition at line 11 of file

00012     def __init__(self, request):
00013         self.request = request

Here is the caller graph for this function:

Member Function Documentation

Return a sequence of user preferred languages.

Definition at line 14 of file

00015     def getPreferredLanguages(self):
00016         """Return a sequence of user preferred languages."""
00017         langs = []
00019         cookie = self.request.cookies.get('I18N_LANGUAGE', None)
00020         available = queryUtility(ILanguageAvailability)
00021         if available is None:
00022             return None
00024         if cookie in [str(lang) for lang in available.getAvailableLanguages()]:
00025             return [cookie]
00027         return None

Member Data Documentation

Definition at line 12 of file

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