🔧 Migrate Tolgee from self-hosted to cloud

Closes #1330
This commit is contained in:
Baptiste Arnaud
2024-07-17 10:58:34 +02:00
parent bd6921b90c
commit 0ee820b4da
16 changed files with 843 additions and 297 deletions

View File

@@ -1,4 +1,4 @@
import { Tolgee } from '@tolgee/react'
import { DevTools, Tolgee } from '@tolgee/react'
import { FormatIcu } from '@tolgee/format-icu'
import en from '../i18n/en.json'
import fr from '../i18n/fr.json'
@@ -8,15 +8,27 @@ import ptBR from '../i18n/pt-BR.json'
import es from '../i18n/es.json'
import ro from '../i18n/ro.json'
import it from '../i18n/it.json'
import el from '../i18n/el.json'
import { env } from '@typebot.io/env'
export const tolgee = Tolgee()
.use(DevTools())
.use(FormatIcu())
.init({
apiKey: env.NEXT_PUBLIC_TOLGEE_API_KEY,
apiUrl: env.NEXT_PUBLIC_TOLGEE_API_URL,
defaultLanguage: 'en',
availableLanguages: ['en', 'fr', 'de', 'pt', 'pt-BR', 'es', 'ro', 'it'],
availableLanguages: [
'en',
'fr',
'de',
'pt',
'pt-BR',
'es',
'ro',
'it',
'el',
],
fallbackLanguage: 'en',
staticData: {
en,
@@ -27,5 +39,6 @@ export const tolgee = Tolgee()
es,
ro,
it,
el,
},
})