Logo Search packages:      
Sourcecode: zope-cps-localizer version File versions  Download package

def Localizer::Accept::AcceptLanguage::select_language (   self,
  languages 
)

This is the selection language algorithm, it returns the user
prefered language for the given list of available languages,
if the intersection is void returns None.

Definition at line 225 of file Accept.py.

00225                                         :
        """
        This is the selection language algorithm, it returns the user
        prefered language for the given list of available languages,
        if the intersection is void returns None.
        """

        language, quality = None, 0.0

        for lang in languages:
            q = self.get_quality(lang)
            if q > quality:
                language, quality = lang, q

        return language






##class AcceptLanguageNode(AcceptNode):


Generated by  Doxygen 1.6.0   Back to index