Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit 4b5da19

Browse files
committed
Refactor app.vue to support internationalization
1 parent 19c5497 commit 4b5da19

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/ui/app.vue

+8
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,24 @@ import Layout from '@/ui/layouts/DefaultLayout.vue';
33
import { VideoConverter, AudioConverter } from '@/ui/blocks';
44
import { createConverterStore } from '@/ui/stores';
55
import { onMounted, onBeforeUnmount } from 'vue';
6+
import { useLanguagePreferences } from '@/ui/composables/language-mode';
67
78
const useVideoConverterStore = createConverterStore();
89
const videoStore = useVideoConverterStore();
910
1011
const useAudioConverterStore = createConverterStore();
1112
const audioStore = useAudioConverterStore();
1213
14+
const {
15+
currentLocale,
16+
setLocale,
17+
} = useLanguagePreferences();
18+
1319
onMounted(async () => {
1420
await videoStore.init();
1521
await audioStore.init();
22+
23+
setLocale(currentLocale.value);
1624
});
1725
1826
onBeforeUnmount(() => {

0 commit comments

Comments
 (0)