diff --git a/frontend/src/lib/i18n/en.ts b/frontend/src/lib/i18n/en.ts index ef34622..6a435c0 100644 --- a/frontend/src/lib/i18n/en.ts +++ b/frontend/src/lib/i18n/en.ts @@ -1,3 +1,5 @@ +// The lang_switch value shows the label of the OTHER language (so when EN is +// active the button offers to switch to FR). export default { title: 'Skilluv starter — fullstack Rust', tagline: 'Rust + Axum backend, SvelteKit frontend, PostgreSQL, ready to hack.', diff --git a/frontend/src/lib/i18n/fr.ts b/frontend/src/lib/i18n/fr.ts index cbfe134..6f50318 100644 --- a/frontend/src/lib/i18n/fr.ts +++ b/frontend/src/lib/i18n/fr.ts @@ -7,5 +7,5 @@ export default { notes_placeholder: 'Écris une note…', notes_add: 'Ajouter', notes_empty: 'Aucune note pour le moment.', - lang_switch: 'EN' + lang_switch: 'EN' // shows label of OTHER lang } as const; diff --git a/frontend/src/lib/i18n/index.svelte.ts b/frontend/src/lib/i18n/index.svelte.ts index f84220d..ee9d25e 100644 --- a/frontend/src/lib/i18n/index.svelte.ts +++ b/frontend/src/lib/i18n/index.svelte.ts @@ -6,9 +6,9 @@ export const dictionaries = { en, fr } as const; export type Dict = typeof en; class LangState { - current = $state('fr'); + current = $state('en'); toggle() { - this.current = this.current === 'fr' ? 'en' : 'fr'; + this.current = this.current === 'en' ? 'fr' : 'en'; } get t(): Dict { return dictionaries[this.current];