Back to index

plone3  3.1.7
Translatable.py
Go to the documentation of this file.
00001 from Interface import Interface
00002 
00003 class ITranslatable(Interface):
00004     """
00005     Interface for translatable content.
00006     """
00007 
00008     def isTranslation():
00009         """
00010         return language if this object is used as multilingual content, 0 otherwise
00011         """
00012 
00013     def addTranslation(language, **kwargs):
00014         """
00015         Add a new language translation of this content.
00016         """
00017 
00018     def removeTranslation(language):
00019         """
00020         Removes a translation
00021         """
00022 
00023     def getTranslation(language='language'):
00024         """
00025         Return the object corresponding to a translated version or None.
00026         If called without arguments it returns the translation in the currently
00027         selected language, or self.
00028         """
00029  
00030     def getTranslationLanguages():
00031         """
00032         Return a list of language codes
00033         """
00034 
00035     def getTranslations():
00036         """
00037         Return a dict of {lang : [object, wf_state]}
00038         """
00039 
00040     def isCanonical():
00041         """
00042         boolean, is this the original, canonical translation of the content.
00043         """
00044 
00045     def getCanonicalLanguage():
00046         """
00047         Return the language code for the canonical translation of this content.
00048         """
00049 
00050     def getCanonical():
00051         """
00052         Return the original, canonical translation of this content.
00053         """
00054 
00055     def setLanguage(language):
00056         """
00057         Sets the language for the current translation - same as DC
00058         """
00059 
00060     def Language():
00061         """
00062         Returns the language of this translation - same as DC
00063         """