Skip to content

Instantly share code, notes, and snippets.

Created April 5, 2011 21:05
Show Gist options
  • Save anonymous/904552 to your computer and use it in GitHub Desktop.
Save anonymous/904552 to your computer and use it in GitHub Desktop.
Send noticications by default using the language set in settings
diff --git a/notification/models.py b/notification/models.py
index f449047..1b50ba5 100644
--- a/notification/models.py
+++ b/notification/models.py
@@ -293,6 +293,8 @@ def send_now(users, label, extra_context=None, on_site=True, sender=None):
if language is not None:
# activate the user's language
activate(language)
+ else:
+ activate(settings.LANGUAGE_CODE)
# update context with user specific translations
context = Context({
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment