[Grok-dev] Trigger i18n translation in the rendering method of a view
Sebastian Ware
sebastian at urbantalk.se
Mon Sep 26 07:43:55 EST 2011
I can get i18n translation to work fine in PageTemplates, but how do I force translation of text that isn't inserted into templates?
I want to do this and get the string to be translated:
from . import ApplicationMessageFactory as _
class TestTranslate(grok.View):
def render(self):
return _("I need to be translated")
I have set my breakpoints and I am trying to figure out how the TAL-engine does this, but I am not making much progress.
Mvh Sebastian
More information about the Grok-dev
mailing list