Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
plone.app.i18n.locales.languages.MetadataLanguages Class Reference
Inheritance diagram for plone.app.i18n.locales.languages.MetadataLanguages:
Inheritance graph
[legend]
Collaboration diagram for plone.app.i18n.locales.languages.MetadataLanguages:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def getAvailableLanguages
def setAvailableLanguages
def getLanguages
def getLanguageListing
def getLanguages
def getLanguageListing

Public Attributes

 languages
 combined

Static Public Attributes

string id = 'plone_app_metadata_languages'
string title = 'Manages available metadata languages'
string meta_type = 'Plone App I18N Metadata Languages'

Detailed Description

A local utility storing a list of available metadata languages.

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

  >>> from zope.interface.verify import verifyClass
  >>> verifyClass(IMetadataLanguages, MetadataLanguages)
  True

Definition at line 67 of file languages.py.


Member Function Documentation

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

Reimplemented from plone.i18n.locales.languages.LanguageAvailability.

Definition at line 31 of file languages.py.

00031 
00032     def getAvailableLanguages(self, combined=False):
00033         """Returns a sequence of language tags for available languages.
00034         """
00035         if combined:
00036             languages = list(self.languages)
00037             languages.extend(self.combined)
00038             return languages
00039         else:
00040             return list(self.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.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

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

def plone.app.i18n.locales.languages.Languages.setAvailableLanguages (   self,
  languages,
  combined = False 
) [inherited]
Sets a list of available language tags.

Definition at line 41 of file languages.py.

00041 
00042     def setAvailableLanguages(self, languages, combined=False):
00043         """Sets a list of available language tags.
00044         """
00045         languages = list(languages)
00046         if combined:
00047             self.combined = languages
00048         else:
00049             self.languages = languages
00050 


Member Data Documentation

Definition at line 29 of file languages.py.

string plone.app.i18n.locales.languages.MetadataLanguages.id = 'plone_app_metadata_languages' [static]

Definition at line 78 of file languages.py.

Definition at line 28 of file languages.py.

string plone.app.i18n.locales.languages.MetadataLanguages.meta_type = 'Plone App I18N Metadata Languages' [static]

Definition at line 80 of file languages.py.

string plone.app.i18n.locales.languages.MetadataLanguages.title = 'Manages available metadata languages' [static]

Definition at line 79 of file languages.py.


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