@param resourceFile: The name of the resource ini file in the egg's info directory.
This file contains the location of localized and non-localized resources
as well as translation files in gettext mo format. The default value for this file is "resources.info".
@type resourceFile: c{str} or c{unicode}
@param fallback: Indicates where locale set fallback should take place.
If set to True the
EggResourceManager? will search
all locales in the locale set till a resource or gettext mo translation
file is found. If set to False the
EggResourceManager? will only try to
locate a resource or gettext mo translation file for the current locale
which is the first locale in the locale set.
@type fallback: c{boolean}
The initilize method performs the following operations:
1. Calls the
EggResourceManager?'s setLocaleSet method passing the localeSet param. See the setLocaleSet method
documentaiton for more info.
-
-
-
-
- Calls pkg_resources.add_activation_listener method passing the EggResourceManager?'s parseEggResourceFiles method as a callback. See the parseEggResourceFiles method for more info.
3.
"""
#returns the value contained in the ini file
#for the given key or None if not fount
getValueForKey(domain, name, locale=None)
hasKey(domain, name, locale=None)
isDirectory(domain, name, locale=None)
listDirectory(domain, name, locale=None)
#This would test for the existence of a file
#matching the value
hasResource(domain, resourceName, locale=None) #optional locale
getResourceAsStream(domain, name, locale=None)
getResourceAsLines(domain, name, locale=None) #don't think we need this
getResourceAsString(domain, name, locale=None)
runResourceAsScript(domain, name, locale=None)
#if import wx works it loads a #ResourceFileSystemHandler on the class
#so can load translations in wx as paths
wx.FileSystem.AddHandler(i18n.ResourceFileSystem())
getText(domain, name, txt, default="IGNORE")
parseEggResourceFiles(self, dist):
getLocaleSet() #returns a list of locales in fallback order
setLocaleSet(self, localeSet) #One or more locales #Array or string
"""
Sets the
EggResourceManagers? locale set and adds the language code as
a fallback for language code county code locale definitions when
fallback is set to True.
"""
getDebugString(domain=None)
__flushCache()
__hasCountryCode(locale)
__stripCountryCode(locale)