Changeset 758
- Timestamp:
- 10/01/05 08:28:59 (3 years ago)
- Files:
-
- django/branches/i18n/django/utils/translation.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/i18n/django/utils/translation.py
r755 r758 155 155 or plural, based on the number. 156 156 """ 157 if number == 1: return gettext(singular) 158 else: return gettext(plural) 157 global _default, _active 158 159 t = _active.get(currentThread(), None) 160 if t is not None: 161 return t.ngettext(singular, plural, number) 162 if _default is None: 163 from django.conf import settings 164 _default = translation('*', settings.LANGUAGE_CODE) 165 return _default.ngettext(singular, plural, number) 159 166 160 167 def get_language_from_request(request):
