Module characterProcessing :: Class LocaleDataMap
[hide private]
[frames] | no frames]

Class LocaleDataMap

source code

object --+
         |
        LocaleDataMap

Allows access to locale-specific data objects, dynamically loading them if needed on request

Instance Methods [hide private]
 
__init__(self, localeDataFactory)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
fetchLocaleData(self, locale)
Fetches a data object for the given locale.
source code
 
invalidateLocaleData(self, locale)
Invalidate the data object (if any) for the given locale.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, localeDataFactory)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • localeDataFactory - the factory to create data objects for the requested locale.
Overrides: object.__init__

fetchLocaleData(self, locale)

source code 

Fetches a data object for the given locale. This may mean that the data object is first created and stored if it does not yet exist in the map. The locale is also simplified (country is dropped) if the full locale can not be used to create a data object.

Parameters:
  • locale (string) - the locale of the data object requested
Returns:
the data object for the given locale

invalidateLocaleData(self, locale)

source code 

Invalidate the data object (if any) for the given locale. This will cause a new data object to be created when this locale is next requested.

Parameters:
  • locale (str) - The locale for which the data object should be invalidated.