          self.assertEqual(trans_real.to_language('sr_Lat'), 'sr-lat')
  
      @override_settings(LOCALE_PATHS=[os.path.join(here, 'other', 'locale')])
      def test_bad_placeholder_1(self):
          """
          Error in translation file should not crash template rendering
 
</s> remove     base_lang = get_language().split('-')[0]
    return base_lang in settings.LANGUAGES_BIDI
 </s> add     lang = get_language()
    if lang is None:
        return False
    else:
        base_lang = get_language().split('-')[0]
        return base_lang in settings.LANGUAGES_BIDI </s> remove     if not language_code_re.search(lang_code):
 </s> add     if lang_code is None or not language_code_re.search(lang_code): </s> remove     get_language, get_language_from_request, get_language_info, gettext,
    gettext_lazy, ngettext_lazy, npgettext, npgettext_lazy, pgettext,
    pgettext_lazy, string_concat, to_locale, trans_real, ugettext,
    ugettext_lazy, ungettext, ungettext_lazy,
 </s> add     get_language, get_language_bidi, get_language_from_request,
    get_language_info, gettext, gettext_lazy, ngettext_lazy, npgettext,
    npgettext_lazy, pgettext, pgettext_lazy, string_concat, to_locale,
    trans_real, ugettext, ugettext_lazy, ungettext, ungettext_lazy,
    def test_language_bidi(self):
        self.assertEqual(get_language_bidi(), False)
        with translation.override(None):
            self.assertEqual(get_language_bidi(), False)

          self.assertEqual(trans_real.to_language('sr_Lat'), 'sr-lat')
  
    def test_language_bidi(self):
        self.assertEqual(get_language_bidi(), False)
        with translation.override(None):
            self.assertEqual(get_language_bidi(), False)

      @override_settings(LOCALE_PATHS=[os.path.join(here, 'other', 'locale')])
      def test_bad_placeholder_1(self):
          """
          Error in translation file should not crash template rendering
keep add keep keep keep keep
 Fixed #24569 -- Made some translation functions accept None value

get_language() can return None when translations are deactivated.
Thanks Nicola Peduzzi for the reporti and Tim Graham for the review. 
tests/i18n/tests.py