コード例 #1
0
    def getLanguageListing(self, combined=False):
        """Return a sequence of language code and language name tuples."""
        languages = _languagelist.copy()
        if combined:
            languages.update(_combinedlanguagelist.copy())

        available = self.getAvailableLanguages(combined=combined)
        languages = {k: v for k, v in languages.items() if k in available}

        return [(code, languages[code][u"name"]) for code in languages]
コード例 #2
0
    def getLanguages(self, combined=False):
        """Return a sequence of Language objects for available languages."""
        languages = _languagelist.copy()
        if combined:
            languages.update(_combinedlanguagelist.copy())

        available = self.getAvailableLanguages(combined=combined)
        languages = {k: v for k, v in languages.items() if k in available}

        return languages
コード例 #3
0
ファイル: languages.py プロジェクト: lccruz/plone.restapi
    def getLanguageListing(self, combined=False):
        """Return a sequence of language code and language name tuples.
        """
        languages = _languagelist.copy()
        if combined:
            languages.update(_combinedlanguagelist.copy())

        available = self.getAvailableLanguages(combined=combined)
        languages = {k: v for k, v in languages.items() if k in available}

        return [(code, languages[code][u'name']) for code in languages]
コード例 #4
0
ファイル: languages.py プロジェクト: lccruz/plone.restapi
    def getLanguages(self, combined=False):
        """Return a sequence of Language objects for available languages.
        """
        languages = _languagelist.copy()
        if combined:
            languages.update(_combinedlanguagelist.copy())

        available = self.getAvailableLanguages(combined=combined)
        languages = {k: v for k, v in languages.items() if k in available}

        return languages
コード例 #5
0
 def getLanguageListing(self, combined=False):
     """Return a sequence of language code and language name tuples."""
     languages = _languagelist.copy()
     if combined:
         languages.update(_combinedlanguagelist.copy())
     return [(code, languages[code][u'name']) for code in languages]
コード例 #6
0
 def getLanguages(self, combined=False):
     """Return a sequence of Language objects for available languages."""
     languages = _languagelist.copy()
     if combined:
         languages.update(_combinedlanguagelist.copy())
     return languages
コード例 #7
0
ファイル: utils.py プロジェクト: sandrarum/ps.zope.i18nfield
 def getLanguageListing(self, combined=False):
     """Return a sequence of language code and language name tuples."""
     languages = _languagelist.copy()
     if combined:
         languages.update(_combinedlanguagelist.copy())
     return [(code, languages[code][u'name']) for code in languages]
コード例 #8
0
ファイル: utils.py プロジェクト: sandrarum/ps.zope.i18nfield
 def getLanguages(self, combined=False):
     """Return a sequence of Language objects for available languages."""
     languages = _languagelist.copy()
     if combined:
         languages.update(_combinedlanguagelist.copy())
     return languages