Back to index

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

List of all members.

Public Member Functions

def __init__
def getAvailableCountries
def setAvailableCountries
def getCountries
def getCountryListing

Public Attributes

 countries

Static Public Attributes

string id = 'plone_app_countries'
string title = 'Manages available countries'
string meta_type = 'Plone App I18N Countries'

Detailed Description

A local utility storing a list of available countries.

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

  >>> from zope.interface.verify import verifyClass
  >>> verifyClass(ICountries, Countries)
  True

Definition at line 10 of file countries.py.


Constructor & Destructor Documentation

Definition at line 25 of file countries.py.

00025 
00026     def __init__(self):
00027         self.countries = ['en']

Here is the caller graph for this function:


Member Function Documentation

Return a sequence of country tags for available countries.

Reimplemented from plone.i18n.locales.countries.CountryAvailability.

Definition at line 28 of file countries.py.

00028 
00029     def getAvailableCountries(self):
00030         """Return a sequence of country tags for available countries.
00031         """
00032         return list(self.countries)

Here is the caller graph for this function:

Return a sequence of Country objects for available countries.

Definition at line 22 of file countries.py.

00022 
00023     def getCountries(self):
00024         """Return a sequence of Country objects for available countries.
00025         """
00026         return _countrylist.copy()

Return a sequence of country code and country name tuples.

Definition at line 27 of file countries.py.

00027 
00028     def getCountryListing(self):
00029         """Return a sequence of country code and country name tuples.
00030         """
00031         return [(code, _countrylist[code][u'name']) for code in _countrylist]

Set a list of available country tags.

Definition at line 33 of file countries.py.

00033 
00034     def setAvailableCountries(self, countries):
00035         """Set a list of available country tags.
00036         """
00037         countries = list(countries)
00038         self.countries = countries

Member Data Documentation

Definition at line 26 of file countries.py.

string plone.app.i18n.locales.countries.Countries.id = 'plone_app_countries' [static]

Definition at line 21 of file countries.py.

Definition at line 23 of file countries.py.

string plone.app.i18n.locales.countries.Countries.title = 'Manages available countries' [static]

Definition at line 22 of file countries.py.


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