Use Locale class methods to get the localized language name for display (#628)

This commit is contained in:
Daniel Markstedt 2022-01-29 14:22:39 -08:00 committed by GitHub
parent fc615b5335
commit 83ad97e577
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1016,7 +1016,9 @@ def change_language():
file_cmds.locale = session["language"]
refresh()
flash(_("Changed Web Interface language to %(locale)s", locale=locale))
language = Locale.parse(locale)
language_name = language.get_language_name(locale)
flash(_("Changed Web Interface language to %(locale)s", locale=language_name))
return redirect(url_for("index"))