https://svelte-i18n.jill64.dev/
Current Language : English ($locale = en)
Top Page
<!-- +page.svelte -->
<script>
import { translate } from 'i18n.js'
</script>
<h2>
{$translate({
en: 'Top Page',
ja: 'γγγγγΌγΈ'
})}
</h2>
Example Schema
// i18n.js
import { init } from '@jill64/svelte-i18n'
export const { match, altered, locale, translate, attach } = init({
locales: ['en', 'ja'],
slug: '[locale=locale]',
defaultLocale: 'en'
})
SSR Support
// hooks.server.js
import { attach } from 'i18n.js'
export const handle = attach