✨ 🌐 Add Localization feature
This commit is contained in:
@ -9,6 +9,7 @@ export const classFilter = ref(localStorage.getItem("classFilter") || "none");
|
||||
export const timetableGroups = ref(
|
||||
JSON.parse(localStorage.getItem("timetableGroups") || "[]")
|
||||
);
|
||||
export const language = ref(localStorage.getItem("lang")) || "en";
|
||||
|
||||
watch(classFilter, (newValue) => {
|
||||
localStorage.setItem("classFilter", newValue);
|
||||
@ -18,6 +19,10 @@ watch(timetableGroups, (newValue) => {
|
||||
localStorage.setItem("timetableGroups", JSON.stringify(newValue));
|
||||
fetchData();
|
||||
});
|
||||
watch(language, (newValue) => {
|
||||
localStorage.setItem("lang", newValue);
|
||||
location.reload();
|
||||
});
|
||||
|
||||
export const selectedDate = ref(new Date(new Date().setUTCHours(0, 0, 0, 0)));
|
||||
export const selectedDay = computed(() => selectedDate.value.getDay() - 1);
|
||||
|
Reference in New Issue
Block a user