Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
plone.i18n.negotiator.path.PathLanguage 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

def plone.i18n.negotiator.path.PathLanguage.__init__ (   self,

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 = []
00018         paths = self.request.get('TraversalRequestNameStack')
00020         available = queryUtility(ILanguageAvailability)
00021         if available is not None:
00022             langs = [str(lang) for lang in available.getAvailableLanguages()]
00024         langs = [path for path in paths if path in langs]
00026         return langs and langs or None

Member Data Documentation

Definition at line 12 of file

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