Skip to main content
Version: 5.x.x

Migrating to v5 (Svelte)

In version 5, the core library was completely redesigned. Before you start, please read the general info about this new version.

Update TolgeeProvider component and initialize Tolgee as described in core migration:

const tolgee = ...


<TolgeeProvider tolgee={tolgee}>
<div slot="fallback">Loading...</div>

Changing language

We've removed v4 getLanguageStore, it's now replaced by the more general hook getTolgee (read more).

import { getTolgee } from '@tolgee/svelte';

const tolgee = getTolgee(['language'])

function handleLanguageChange(e) {

<select value={$tolgee.getLanguage()} on:change={handleLanguageChange}>


useTranslate now returns an object with t store instead of the t directly.

const { t } = useTranslate();