Skip to content

Build your personal knowledge base with Trilium Notes

fix(standalone/setup): current language not restored when going back

Elian Doranf83e184fcdbc
diff --git a/apps/client/src/setup.tsx b/apps/client/src/setup.tsx
index 10b648cbc6..a45ffd900c 100644
--- a/apps/client/src/setup.tsx
+++ b/apps/client/src/setup.tsx
@@ -85,9 +85,9 @@ function App() {
}
function SelectLanguage({ setState }: { setState: (state: State) => void }) {
- const [ currentLocale, setCurrentLocale ] = useState("en");
- const filteredLocales = useMemo(() => LOCALES.filter(l => !l.contentOnly), []);
const { t, i18n } = useTranslation();
+ const [ currentLocale, setCurrentLocale ] = useState(i18n.language);
+ const filteredLocales = useMemo(() => LOCALES.filter(l => !l.contentOnly), []);
return (
<SetupPage