def hijack_translation():
"""Sabotage Django's fascist linguistical regime."""
# Override functions that check if language is known to Django
translation.check_for_language = lambda lang_code: True
trans_real.check_for_language = lambda lang_code: True
translation.get_language_from_request = get_language_from_request
# Override django's inadequate bidi detection
translation.get_language_bidi = get_language_bidi
# We hijack gettext functions to install the safe variable formatting
# override
override_gettext(gettext)
评论列表
文章目录