fredy goes multilingual 🇩🇪 🇺🇸

This commit is contained in:
orangecoding
2026-06-04 10:35:42 +02:00
parent 019b9ac87b
commit 1dcb852ea1
40 changed files with 2072 additions and 879 deletions

View File

@@ -379,6 +379,20 @@ export const useFredyState = create(
throw Exception;
}
},
async setLanguage(language) {
try {
await xhrPost('/api/user/settings/language', { language });
set((state) => ({
userSettings: {
...state.userSettings,
settings: { ...state.userSettings.settings, language },
},
}));
} catch (Exception) {
console.error('Error while trying to update language setting. Error:', Exception);
throw Exception;
}
},
},
};