Ticket #8626: 8626.diff

File 8626.diff, 802 bytes (added by arien, 9 years ago)

Patch the locale.locale_alias dict for 'en'.

  • django/utils/translation/trans_real.py

    1010from django.utils.safestring import mark_safe, SafeData
    1111from django.utils.thread_support import currentThread
     13# Monkey patch to allow translations for the 'en' locale.  (In the locale
     14# module, 'en' is mapped to the 'en_US.ISO8859-1' alias, which causes the
     15# en_US .mo file to be loaded for the 'en' locale.)  See ticket #8626.
     16locale.locale_alias['en'] = 'en.ISO8859-1'
    1318# Translations are cached in a dictionary for every language+app tuple.
    1419# The active translations are stored by threadid to make them thread local.
    1520_translations = {}
Back to Top