# General Translation Changelog: gt-next 6.2.0: Build-time processing with SWC
URL: https://generaltranslation.com/en-GB/blog/gt-next_v6_2_0.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: 
Authors: Ernest McCarter
Published: 2025-08-19

## Overview

In **gt-next 6.2.0**, we&#39;ve taken a major step towards moving processing from runtime to build time using an **SWC plugin**.
This approach unlocks new capabilities such as compile-time hashing, pre-rendered translations, and stricter validation — all without adding runtime overhead.

To keep things focused, we started small with three key improvements.

* **Compile-time hashing**
* **Translation on demand**
* **Build-time linting rules**

***

## Compile-Time Hashing

While this is a relatively small optimisation, we now perform **hash calculations at build time** instead of at runtime.
Functions like [`getGT()`](/docs/react/nextjs/reference/functions/get-gt) and server-side [`<T>`](/docs/react/reference/components/t) no longer need to compute and cache hashes on every call, resulting in more consistent performance.

***

## Translation on Demand

One of the biggest pain points for developers has been refreshing the page during development to see real-time string updates.

[`getGT()`](/docs/react/nextjs/reference/functions/get-gt) and [`useGT()`](/docs/react/reference/hooks/use-gt) follow the familiar i18n pattern:

```tsx title="page.tsx" copy
export default function Page() {
  const gt = useGT()
  // const gt = await getGT(); for server-side

  return (
    <>
      {gt('some content to translate')}
      {gt('some other content to translate')}
    </>
  )
}
```

We deliberately kept `gt()` synchronous to match other i18n libraries.
The downside was a `two-step translation process`:

1. Register the text with the API.
   2.	Wait for a second render to display the translated result.

Now, thanks to the compiler, translatable content is scanned ahead of time and passed directly into [`useGT()`](/docs/react/reference/hooks/use-gt) or [`getGT()`](/docs/react/nextjs/reference/functions/get-gt) at compile time.
This means translations are immediately available at runtime — no page refreshes.

***

## Build-Time Linting

Previously, detecting incorrect usage of [`<T>`](/docs/react/reference/components/t) components required running `gtx-cli` with a custom linter.
This created inconsistencies between **development** and **production** behaviour.

With 6.2.0, linting rules are now enforced directly in the SWC plugin.
If any translatable content isn&#39;t wrapped in a [`<T>`](/docs/react/reference/components/t) component, you&#39;ll get a **build-time error**, ensuring issues are caught early.

***

## Why SWC (for now)?

Our transition from runtime to build time is still in its early stages.
We&#39;re starting with Next.js, but plan to support other frameworks soon.
Babel plugins offering the same functionality are already on the roadmap.

***

`gt-next 6.2.0` lays the groundwork for a faster, more reliable translation workflow.
By shifting logic to build time, we&#39;re reducing runtime complexity while making translations more immediate and predictable.

## Sitemap

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