Back to index

plone3  3.1.7
Public Member Functions
plone.i18n.locales.languages.ContentLanguageAvailability Class Reference
Inheritance diagram for plone.i18n.locales.languages.ContentLanguageAvailability:
Inheritance graph
[legend]
Collaboration diagram for plone.i18n.locales.languages.ContentLanguageAvailability:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def getAvailableLanguages
def getLanguages
def getLanguageListing

Detailed Description

A list of available content languages.

Let's make sure that this implementation actually fulfills the API.

  >>> from zope.interface.verify import verifyClass
  >>> verifyClass(IContentLanguageAvailability, ContentLanguageAvailability)
  True

Definition at line 44 of file languages.py.


Member Function Documentation

def plone.i18n.locales.languages.LanguageAvailability.getAvailableLanguages (   self,
  combined = False 
) [inherited]
Return a sequence of language tags for available languages.

Reimplemented in plone.app.i18n.locales.languages.Languages.

Definition at line 19 of file languages.py.

00019 
00020     def getAvailableLanguages(self, combined=False):
00021         """Return a sequence of language tags for available languages.
00022         """
00023         languages = _languagelist.keys()
00024         if combined:
00025             languages.extend(_combinedlanguagelist.keys())
00026         return languages

Here is the caller graph for this function:

def plone.i18n.locales.languages.LanguageAvailability.getLanguageListing (   self,
  combined = False 
) [inherited]
Return a sequence of language code and language name tuples.

Definition at line 35 of file languages.py.

00035 
00036     def getLanguageListing(self, combined=False):
00037         """Return a sequence of language code and language name tuples.
00038         """
00039         languages = _languagelist.copy()
00040         if combined:
00041             languages.update(_combinedlanguagelist.copy())
00042         return [(code, languages[code][u'name']) for code in languages]
00043 

def plone.i18n.locales.languages.LanguageAvailability.getLanguages (   self,
  combined = False 
) [inherited]
Return a sequence of Language objects for available languages.

Definition at line 27 of file languages.py.

00027 
00028     def getLanguages(self, combined=False):
00029         """Return a sequence of Language objects for available languages.
00030         """
00031         languages = _languagelist.copy()
00032         if combined:
00033             languages.update(_combinedlanguagelist.copy())
00034         return languages


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