> ## Documentation Index
> Fetch the complete documentation index at: https://www.octoparse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 翻訳を保存

> App のロケール翻訳オーバーレイを作成／更新。

**`PUT`** `https://api-datahub.octoparse.com/v1/data-apps/{app_id}/translations/{locale}`

認証：APIキー必須（`Authorization: Bearer <API Key>`）。 App 作者のみ。

1 ロケールのカード欄と任意 README を書く。ハッシュ基準はワークスペース（なければ最新 Release）。`stale=true` は未公開下書き向け。ソースロケールはここでは上書き不可。

## リクエスト

<ParamField path="app_id" type="string" required>
  field
</ParamField>

<ParamField path="locale" type="string" required>
  Locale code.
</ParamField>

<ParamField body="entries" type="object" required>
  field
</ParamField>

<ParamField body="expected_revision" type="integer">
  field
</ParamField>

### リクエスト例

```bash theme={null}
curl -X PUT \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"entries": {"identity.name": "Product Review Lookup", "identity.summary": "Fetch public reviews by product id"}, "readme": "# Product Review Lookup\n…"}' \
  "https://api-datahub.octoparse.com/v1/data-apps/carol/reviews-query/translations/en"
```

## レスポンス

### 200 成功

```json theme={null}
{
  "data": {
    "locale": "string",
    "origin": "author",
    "revision": 0,
    "based_on_version": "string",
    "based_on_hash": "string",
    "stale": false,
    "stale_paths": [
      "string"
    ],
    "warnings": [
      {
        "code": "string",
        "params": {}
      }
    ]
  }
}
```

### エラー

| HTTP | `code`         | `category`  | Description         |
| ---- | -------------- | ----------- | ------------------- |
| 401  | `unauthorized` | `forbidden` | API キー欠落または無効。      |
| 404  | `*-not-found`  | `not_found` | 対象が存在しないか、現資格から不可視。 |

エラー応答は `{"error": {code, category, message, retryable}}` です。<a href="/docs/jp/datahub/api/reference/introduction#errors">エラー</a> を参照。

## クライアントライブラリ

Python / JavaScript SDK はまだこのエンドポイントをラップしていません。REST を直接呼び出してください。
