# General Translation Changelog: gt-tanstack-start 0.1.0: i18n for TanStack Start
URL: https://generaltranslation.com/en-GB/blog/gt-tanstack-start_v0_1_0.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: 
Authors: Ernest McCarter
Published: 2026-02-16

## Overview

`gt-tanstack-start` is an initial attempt to provide i18n support tailored for TanStack Start.

> **This library is experimental.** It is still in its infancy, and we are very open to feedback. If you need translations in a production environment with TanStack, we recommend using `gt-react` for now.

***

## What&#39;s Included

* **[`initializeGT()`](/docs/react/reference/config#initialize)** — Configures the i18n manager for TanStack Start. Call this once at the top of your root route file.
* **[`GTProvider`](/docs/react/reference/components/gt-provider)** — Wraps your app with translation context, with built-in SSR detection and locale resolution tailored to TanStack Start.
* **[`getTranslations()`](/docs/react/tanstack-start/reference/functions/get-translations)** — An async function designed to be called in your root loader to pass translations into the provider.
* **[`getLocale()`](/docs/react/tanstack-start/reference/functions/get-locale)** — Returns the resolved locale for the current request.
* **[`<T>`](/docs/react/reference/components/t), [`<Var>`](/docs/react/reference/components/var), [`<LocaleSelector>`](/docs/react/reference/components/locale-selector)** — Re-exported from `gt-react` so you can import everything from a single package.

***

## Quickstart

### Install

```bash
npm install gt-tanstack-start
```


### Configure `gt.config.json`

```json
{
  "defaultLocale": "en",
  "locales": ["fr", "zh"],
  "files": {
    "gt": {
      "output": "src/_gt/[locale].json"
    }
  }
}
```


### Set Environment Variables

```env
VITE_GT_PROJECT_ID=your-project-id
VITE_GT_DEV_API_KEY=your-dev-api-key
```


### Create a Translation Loader

```ts
// loadTranslations.ts
export async function loadTranslations(locale: string) {
  const translations = await import(`./src/_gt/${locale}.json`);
  return translations.default;
}
```


### Set Up Your Root Route

```tsx
// __root.tsx
import { HeadContent, Scripts, createRootRoute } from '@tanstack/react-router';
import {
  initializeGT,
  GTProvider,
  getTranslations,
  getLocale,
} from 'gt-tanstack-start';
import gtConfig from '../../gt.config.json';
import { loadTranslations } from '../../loadTranslations';

initializeGT({
  ...gtConfig,
  projectId: import.meta.env.VITE_GT_PROJECT_ID,
  devApiKey: import.meta.env.VITE_GT_DEV_API_KEY,
  loadTranslations,
});

export const Route = createRootRoute({
  loader: async () => ({
    translations: await getTranslations(),
    locale: getLocale(),
  }),
  shellComponent: RootDocument,
});

function RootDocument({ children }: { children: React.ReactNode }) {
  const { translations, locale } = Route.useLoaderData();
  return (
    <html lang={locale}>
      <head>
        <HeadContent />
      </head>
      <body>
        <GTProvider translations={translations}>
          {children}
        </GTProvider>
        <Scripts />
      </body>
    </html>
  );
}
```


### Translate Content

```tsx
import { T } from 'gt-tanstack-start';

export default function Page() {
  return (
    <T>
      <p>This gets translated automatically.</p>
    </T>
  );
}
```

***


## Looking Forward

This is v0.1.0 — the foundation is here, but there&#39;s plenty more to build.
SSG and locale routing are some of the next features we&#39;re looking to add in upcoming releases.

If you&#39;re interested in trying it out, feedback is very welcome.
Drop by our [Discord](https://discord.gg/SjQwPjZaGa) or open an issue on [GitHub](https://github.com/generaltranslation/gt/issues).

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
