# General Translation Changelog: gt-node 0.6.0: tx() によるランタイム翻訳
URL: https://generaltranslation.com/ja/blog/gt-node_v0_6_0.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: 
Authors: Ernest McCarter
Published: 2026-04-14

## 概要

`gt-node` で [`tx()`](/docs/node/reference/functions/tx) が使えるようになりました。これは、runtime に文字列を翻訳するための関数です。任意の文字列を [`tx()`](/docs/node/reference/functions/tx) に渡すだけで、build ステップなしに翻訳済みの文字列を取得できます。

これにより、動的コンテンツのサーバーサイド翻訳が可能になります。たとえば、ユーザー生成テキスト、データベースの値、API レスポンスなど、事前に分からないあらゆるものに対応できます。

## 使い方

### 基本

```js
import { tx } from 'gt-node';

const translated = await tx('Processing complete');
```

### 変数を使う

```js
const translated = await tx('Hello, {name}!', { name: 'María' });
```

### ロケールを指定する

```js
const status = await tx('Order shipped', { $locale: 'ja' });
```

## リンク

* [PR #1207](https://github.com/generaltranslation/gt/pull/1207)

## Sitemap

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