API Reference¶
This document details the API for nti.i18n.
Interfaces¶
Interfaces related to internationalization.
Locales¶
Interfaces¶
Interfaces related to localization.
-
interface
nti.i18n.locales.interfaces.
ICcTLDInformation
¶ Extends:
plone.i18n.locales.interfaces.ICcTLDInformation
A list of country code top level domains and their relevant languages (when known).
-
getTLDs
()¶ Return a dictionary of known ccTLDs and their languages.
-
getAvailableTLDs
()¶ Return a sequence of country code top level domains.
-
getLanguagesForTLD
(tld)¶ Return the relevant languages for a top level domain as a sequence.
-
-
interface
nti.i18n.locales.interfaces.
ICountryAvailability
¶ Extends:
plone.i18n.locales.interfaces.ICountryAvailability
A list of available coutries.
-
getAvailableCountries
()¶ Return a sequence or view of unicode country tags for available countries.
-
getCountryListing
()¶ Return a sequence of unicode country code and country name tuples.
-
getCountries
()¶ Return a dictionary mapping country tags to country data.
Country data has at least the ‘name’ key.
-
Implementations¶
Implementation of country data.
-
class
nti.i18n.locales.countries.
CountryAvailability
¶ Bases:
object
Default implementation of country availability, based on countries.json distributed with this package.
Implementation of country-code language information.
-
class
nti.i18n.locales.cctld.
CcTLDInformation
¶ Bases:
object
A list of country code top level domains their relevant languages.
Descriptions for most TLDs a can be found at http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains