code: def get_language_config():
      
      language_code = convert_language_code(get_language() or settings.LANGUAGE_CODE)
      if not language_file_exists(language_code):
          language_code = language_code[:2]
          if not language_file_exists(language_code):
              # Fall back to English if Tiny MCE 4 does not have required translation
              language_code = 'en'
      config = {'language': language_code}
      if get_language_bidi():
          config['directionality'] = 'rtl'
      else:
          config['directionality'] = 'ltr'
      return config
docs: Creates a language configuration for TinyMCE4 based on Django project settings
  
      :return: language- and locale-related parameters for TinyMCE 4
      :rtype: dict