diff --git a/web/src/settings.js b/web/src/settings.js index 531b80b968..65cab9767c 100644 --- a/web/src/settings.js +++ b/web/src/settings.js @@ -110,6 +110,7 @@ export function build_page() { user_can_change_email: settings_data.user_can_change_email(), user_role_text: people.get_user_type(page_params.user_id), default_language_name: settings_display.user_default_language_name, + default_language: user_settings.default_language, realm_push_notifications_enabled: page_params.realm_push_notifications_enabled, settings_object: user_settings, send_read_receipts_tooltip: $t({ diff --git a/web/src/settings_display.js b/web/src/settings_display.js index 88390c9fdb..76dcbe1784 100644 --- a/web/src/settings_display.js +++ b/web/src/settings_display.js @@ -95,6 +95,10 @@ function user_default_language_modal_post_render() { $("#user-preferences .language_selection_widget .language_selection_button span").text( new_language, ); + $("#user-preferences .language_selection_widget .language_selection_button span").attr( + "data-language-code", + setting_value, + ); change_display_setting( data, diff --git a/web/templates/settings/display_settings.hbs b/web/templates/settings/display_settings.hbs index f4a7a4a192..79ed3956f4 100644 --- a/web/templates/settings/display_settings.hbs +++ b/web/templates/settings/display_settings.hbs @@ -10,7 +10,8 @@ {{> language_selection_widget section_name="default_language_name" setting_value=default_language_name - section_title=settings_label.default_language_settings_label }} + section_title=settings_label.default_language_settings_label + language_code=default_language }} {{/unless}}
diff --git a/web/templates/settings/language_selection_widget.hbs b/web/templates/settings/language_selection_widget.hbs index 1ac5b772af..6ea9a76c4d 100644 --- a/web/templates/settings/language_selection_widget.hbs +++ b/web/templates/settings/language_selection_widget.hbs @@ -6,7 +6,7 @@ {{/if}}