From 74ecdd95d2361af86f1572a9fe93e4aca7bed742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Tue, 31 Oct 2023 13:22:46 +0100 Subject: [PATCH] Sort languages in the language selector by the language code --- web/src/components/l10n/LanguageSwitcher.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/components/l10n/LanguageSwitcher.jsx b/web/src/components/l10n/LanguageSwitcher.jsx index a6a26eca84..e2fddf2d2b 100644 --- a/web/src/components/l10n/LanguageSwitcher.jsx +++ b/web/src/components/l10n/LanguageSwitcher.jsx @@ -36,9 +36,9 @@ export default function LanguageSwitcher() { changeLanguage(value); }, [setSelected, changeLanguage]); - const options = Object.entries(languages).map(([id, name]) => { - return ; - }); + // sort by the language code to maintain consistent order + const options = Object.keys(languages).sort() + .map(id => ); return ( <>