This is a demo to use Svelte with Svelte i18n
,
and uses localStorage to remember the last language selection
You can change the lang with the select: Idioma/Language
Options:
npm install
npm run dev
public/lang/en.json
{
"home": {
"topic": "Hi welcome to our website!",
"label": "Services",
"services": {
"web": "Web application development",
"backend": "Backend development"
}
},
"switch": {
"lang": "Language"
}
}
public/lang/es.json
for spanishLocalSwitcher.svelte
contains the select for the languages