mirror of
https://github.com/django/django.git
synced 2025-07-04 01:39:20 +00:00
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
This commit is contained in:
parent
828ca2572d
commit
f913e4d8c9
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user