Add locale handling

This commit is contained in:
2023-01-15 21:24:40 +01:00
parent 56d58a7ea2
commit c01f243fcd
8 changed files with 202 additions and 5 deletions

View File

@ -0,0 +1,7 @@
export function getLocale():string {
return localStorage.getItem("locale") ?? window.navigator.language.split("-")[0];
}
export function setLocale(locale:string):void {
localStorage.setItem("locale", locale);
}