# Can I do i18n without translation files?

48.7 s · Narrator: Frederick Surrey

Yes. With gt-react or gt-next, content stays inline in your components inside a `<T>` component, and translations are generated at build time as output, so there are no keys or per-locale JSON files to write and keep in sync.

| Time | Voice | Line | On screen |
| --- | --- | --- | --- |
| 0:00.88 | Narrator | In Tokyo, your checkout page opens in Japanese with one line still in English. | A checkout page draws in the middle of the frame. On "Tokyo" the language code `ja` appears over its top right corner, and on "checkout" its rows rise: a heading, two item rows drawn as bars, a rule, the total, the tax note and a white button. The heading and the total are in Japanese; the tax note reads "Tax calculated at checkout." in English. The heading "One line still in English" rises on "one", and on "English" the tax note turns blue. |
| 0:05.84 | Narrator | Its key went into en.json, and nobody added it to ja.json. | On "key" the page slides to the right. On "went" a code panel opens with `./`: `en.json` with its keys `summary.title`, `summary.total_label` and `summary.tax_notice`, then `ja.json` with `summary.title`, `summary.total_label` and an empty row. On "en.json" the blue moves from the tax note to `summary.tax_notice`. On "nobody" a white box draws around the empty row under `ja.json`, and on "ja.json" a line joins that row to the English tax note. |
| 0:12.56 | Narrator | General Translation lets you stop writing translation files with gt-react or gt-next. | The answer card cuts in on "General": the answer alone rises as it is spoken, in two lines, "General Translation lets you stop writing" then "translation files with gt-react or gt-next", and the General Translation mark sits small in the lower left corner. |
| 0:19.68 | Narrator | Run npx gt init to set up gt-next and choose your languages. | The heading "Run npx gt init". The code panel opens again with `gt.config.json`: `"defaultLocale": "en"`, `"locales": ["es", "fr", "ja"]` and the output path `public/_gt/[locale].json`. On "init" a file panel opens on the right with `en.json`, `es.json`, `fr.json` and `ja.json`; on "gt-next" `gt.config.json` joins them, and on "languages" `"es"`, `"fr"` and `"ja"` turn blue. |
| 0:24.92 | Narrator | Write the English inside a T component, and nobody has to update ja.json by hand. | The heading "Write the English in <T>". The code panel cuts to `CheckoutSummary.tsx`, which reads its three strings with `t('summary.title')`, `t('summary.total_label')` and `t('summary.tax_notice')`. On "English" they become `<h2>Order Summary</h2>`, `<p>Total (before tax):</p>` and `<small>Tax calculated at checkout.</small>`; on "inside" `<div>` becomes `<T><div>` and `</div>` becomes `</div></T>`; on "T" `import { T } from 'gt-next';` opens at the top. On "nobody" `const { t } = useTranslation();` is struck out, and on "ja.json" the four JSON files in the file panel are struck out and close, which leaves `gt.config.json`. On "hand" a white box draws around the three English lines. A blue bar marks each changed line. |
| 0:31.24 | Narrator | Then add npx gt translate to your build script, and every build writes the Japanese. | The heading "Add npx gt translate to your build script". The code panel cuts to `package.json` over `.gitignore`. On "npx" `npx gt translate && ` is typed in front of `next build`. On "script" a white box draws around the build line, and on "every" a line joins it to the file panel. On "writes" `public/_gt/` appears in the file panel with `es.json`, `fr.json` and `ja.json` under it, and `public/_gt/` opens in `.gitignore`. Just after "Japanese" a white box draws around `ja.json`. |
| 0:37.66 | Narrator | Now the tax line appears in Spanish, French and Japanese with the rest of the page. | The checkout page cuts back in the middle of the frame, in English, with the code `en`. On "Spanish", "French" and "Japanese" the whole page switches to that language, the tax note with the rest, and the code changes with it. On "rest" the Japanese tax note turns blue, in the place where the English line turned blue at the start. |
| 0:43.47 | No voice |  | The end card: the General Translation logo with generaltranslation.com/docs/react/guides/translating-jsx under it, held to the last frame while the music ends on a held chord. |

Times are where each line starts in the final, read from the film's own audio.
