Tolgee
Use Tolgee for MainSDK translations - project and API key, main.yaml, locales, missing strings caught by the check, testing and swapping.
Tolgee is an open-source localization platform with in-context translation, available as a cloud service or self-hosted. Behind i18n, it holds your translations while your code keeps calling t(). Pick it when you want an open-source tool your team can host.
Interfaces it serves
Pick Tolgee in main.yaml for any of these. Your calls stay the same, and you can swap later.
i18nPreviewDriver tolgee Tolgee
i18n:
driver: tolgeeSwap to another provider
Before you start
- Create a Tolgee project, on Tolgee Cloud or your own instance, with the languages you ship.
- Create a project API key.
- Store the key in your secrets manager.
Configure
i18n:
driver: tolgee
locales: [en-IN, hi-IN, ta-IN]
# [to be decided] instance URL, and the API key as secret:TOLGEE_API_KEYUse it
import { t } from "mainsdk";
export function heading(orders: unknown[]) {
return t("orders.count", { count: orders.length });
}Local development and testing
Build with the default files driver and switch to tolgee when translators join. In tests, createTestApp() from @mainsdk/testing runs i18n without a network, and chaos.on("i18n", { outage: true }) simulates Tolgee being unreachable.
What MainSDK adds on top
- A missing translation fails the check, not the user.
- Formats from Unicode CLDR, and the locale from the user's choice first, never guessed from IP alone.
Limits and notes
- Planned driver from the product requirements;
i18nhas no spec yet. - How strings sync between your repo and Tolgee is not defined yet.
Swap to or from it
i18n:
driver: tolgee # was filesFAQ
Can I self-host Tolgee? Yes, Tolgee can be self-hosted. How the driver is pointed at your instance is not decided yet.
Next
Open questions
Was this page helpful?