This line returns an error for me when you have sublanguages like `es-ES`, since `default_language` uses the django format (`es-es`) while `installed_languages` uses the ietf format as its key (`es-ES`). So i'd replace `default_language` in here with `lcode_to_ietf(default_language)`.