def render_email(template, context):
 @safe_translation
 def _render(locale):
  'Render an email in the given locale.\n\n        Because of safe_translation decorator, if this fails,\n        the function will be run again in English.\n        '
  req = RequestFactory()
  req.META = {}
  req.locale = locale
  return render_to_string(template, context)
 return _render(translation.get_language())

def render_email ( template , context ) : @ safe_translation def _render ( locale ) : req = RequestFactory ( ) req . META = { } req . locale = locale return render_to_string ( template , context ) return _render ( translation . get_language ( ) )
renders a template in the currently set locale .