From f5c6c574ada26ec0b2766f5ca20bb2b5b7393ec5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 19 Apr 2010 07:34:46 +0000 Subject: Dip a toe in the i18n waters. --- repoze/bfg/interfaces.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'repoze/bfg/interfaces.py') diff --git a/repoze/bfg/interfaces.py b/repoze/bfg/interfaces.py index 40d29348c..92003a9f9 100644 --- a/repoze/bfg/interfaces.py +++ b/repoze/bfg/interfaces.py @@ -229,3 +229,13 @@ class IPackageOverrides(Interface): # VH_ROOT_KEY is an interface; its imported from other packages (e.g. # traversalwrapper) VH_ROOT_KEY = 'HTTP_X_VHM_ROOT' + +class ITranslatorFactory(Interface): + """ Internal interface representing an i18n translator factory """ + def __call__(self, request): + """ Return a translator """ + +class ITranslator(Interface): + def __call__(self, tstr): + """ Return a translation based on the translation string tstr """ + -- cgit v1.2.3