diff options
| author | Georg Bauer <gb@hugo.westfalen.de> | 2005-09-30 08:49:11 +0000 |
|---|---|---|
| committer | Georg Bauer <gb@hugo.westfalen.de> | 2005-09-30 08:49:11 +0000 |
| commit | f913e4d8c94a69794527a7c2b556a4dfd9e831d9 (patch) | |
| tree | dfe65900ff605d68740cab617a5d9f8a37f66fa3 | |
| parent | 828ca2572dc772dcb0efe46fcb99ad762d7ade5b (diff) | |
added a gettext_noop function to django.utils.translation
git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@738 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/utils/translation.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/django/utils/translation.py b/django/utils/translation.py index 293c7ed261..6385c7b26b 100644 --- a/django/utils/translation.py +++ b/django/utils/translation.py @@ -139,6 +139,16 @@ def gettext(message): _default = translation('*', settings.LANGUAGE_CODE) return _default.gettext(message) +def gettext_noop(message): + """ + This function is used to just mark strings for translation + but to not translate them now. This can be used to store + strings in global variables that should stay in the base + language (because they might be used externally) and will + be translated later on. + """ + return message + def get_language_from_request(request): """ analyze the request to find what language the user |
