MainSDK
Search⌘K
Integrations

Lokalise

Use Lokalise for MainSDK translations - project and API token, main.yaml, locales, missing strings caught by the check, testing and swapping.

1 interface1 driverWritten guide
Updated 2026-10-28

Lokalise is a translation management platform for product and engineering teams. Behind i18n, it holds your translations while your code keeps calling t(). Pick it when your team already manages strings in Lokalise.

Interfaces it serves

Pick Lokalise in main.yaml for any of these. Your calls stay the same, and you can swap later.

Before you start

  1. Create a Lokalise project with the languages you ship, and note its project ID.
  2. Create an API token with access to the project.
  3. Store the token in your secrets manager.

Configure

main.yaml
i18n:
  driver: lokalise
  locales: [en-IN, hi-IN, ta-IN]
  # [to be decided] project ID, and the API token as secret:LOKALISE_API_TOKEN

Use it

app/orders/heading.ts
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 lokalise when translators join. In tests, createTestApp() from @mainsdk/testing runs i18n without a network, and chaos.on("i18n", { outage: true }) simulates Lokalise being unreachable.

What MainSDK adds on top

  • A missing translation fails the check, not the user.
  • Pseudo-localization in the check catches layout breaks before a translator sees them.

See Languages and formats.

Limits and notes

  • Planned driver from the product requirements; i18n has no spec yet.
  • How strings sync between your repo and Lokalise is not defined yet.

Swap to or from it

main.yaml
i18n:
  driver: lokalise   # was files

FAQ

Which file formats move in and out? MainSDK imports and exports XLIFF, iOS .xcstrings, Android strings and ICU JSON (byo-content).

Next

Open questions

Was this page helpful?

↑↓ moveEnter openEsc close

Not decided yet