Back to index

plone3  3.1.7
translationservice.py
Go to the documentation of this file.
00001 from zope.interface import Interface
00002 
00003 class ITranslationServiceTool(Interface):
00004     """ Utility methods to access the translation machinery
00005     """
00006 
00007     def utranslate(*args, **kw):
00008         """Translate method to access the translation service
00009            rom resticted code like skins.
00010         """
00011 
00012     def encode(m, input_encoding=None, output_encoding=None, errors='strict'):
00013         """Encode a give unicode type or string type to string type in encoding
00014            output_encoding
00015         """
00016 
00017     def asunicodetype(m, input_encoding=None, errors='strict'):
00018         """Create type unicode from type string"""
00019 
00020     def ulocalized_time(time, long_format = None, context = None, domain='plonelocales'):
00021         """Returns localized time."""
00022 
00023     def day_msgid(number, format=''):
00024         """Returns the msgid which can be passed to the translation service for
00025            l10n of weekday names. Format is either '', 'a' or 's'.
00026         """
00027 
00028     def month_msgid(number, format=''):
00029         """Returns the msgid which can be passed to the translation service for
00030            l10n of month names. Format is either '' or 'a' (long or abbreviation).
00031         """
00032 
00033     def month_english(number, format=''):
00034         """Returns the english name of month by number. Format is either '' or
00035            'a' (long or abbreviation).
00036         """
00037 
00038     def weekday_english(number, format=''):
00039         """Returns the english name of a week by number. Format is either '',
00040            'a' or 'p'.
00041         """