Package elisa :: Package extern :: Module translation :: Class Translator
[hide private]
[frames] | no frames]

Class Translator

source code


I translate translatables and messages. I need to be told where locale directories can be found for all domains I need to translate for.

Instance Methods [hide private]
 
__init__(self) source code
 
addLocaleDir(self, domain, dir)
Add a locale directory for the given text domain.
source code
 
translateTranslatable(self, translatable, lang='frontend')
Translate a translatable object, in the given language.
source code
 
translate(self, message, lang='frontend')
Translate a message, in the given language.
source code

Inherited from log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

Class Variables [hide private]
  logCategory = 'translator'
Implementors can provide a category to log their messages under.
Method Details [hide private]

translateTranslatable(self, translatable, lang='frontend')

source code 
Translate a translatable object, in the given language.
Parameters:
  • lang - language code (or the current locale if None)