{
i18n as default,
i18n,
load,
isLoading,
isError
}
i18n
isLoading
{init, changeLanguage, loadLanguages, loadNamespaces, loadResources, reloadResources}
load
method is currently runningisError
{init, changeLanguage, loadLanguages, loadNamespaces, loadResources, reloadResources}
load
method has completed running with an errorload
{init, changeLanguage, loadLanguages, loadNamespaces, loadResources, reloadResources}
i18n
isLoading
and isError
i18n
npm install --save "@warren-bank/i18next-svelte"
performed once
short demo
import i18next from 'i18next'
import {load} from '@warren-bank/i18next-svelte'
const options = {}
i18next
.use(...)
.use(...)
load.init(i18next, options)
performed many
short demo
<script>
import i18n from '@warren-bank/i18next-svelte'
</script>
<h1>{$i18n.t('my.key')}</h1>
cd demo
npm install
npm run dev
# open URL: http://localhost:5173/