diff --git a/src/lib/i18n/en.ts b/src/lib/i18n/en.ts index 46380ac..048ca18 100644 --- a/src/lib/i18n/en.ts +++ b/src/lib/i18n/en.ts @@ -1,7 +1,7 @@ export default { home: { titles: { - continue: 'Continue from pause', + continue: 'Continue From Last Session', history: 'History', myPlaylists: 'My Playlists', recPlaylists: 'Recommended Playlists' diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 2e47312..c5df11d 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -6,7 +6,7 @@ import Button from "$lib/ui/Button.svelte" import { Layer } from "m3-svelte" import { goto } from "$app/navigation" - import { getI18n } from "$lib/i18n" + import { getI18n, setLanguage } from "$lib/i18n" let { data }: PageProps = $props() @@ -20,7 +20,11 @@ goto('/user')} right={[ - {icon: "i-material-symbols:settings-rounded", onclick: () => alert('Settings clicked')} + // {icon: "i-material-symbols:settings-rounded", onclick: () => alert('Settings clicked')} + // Language switching button + {icon: "i-material-symbols:translate-rounded", onclick: () => { + setLanguage(data.lang === 'en' ? 'zh' : 'en') + }} ]} />