LocalePack
ChromeFirefoxEdgeOperaSafariCWS 列表頁
Vue.jsReact
Next.jsi18nextReact Native
開發者指南成功案例
Placeholder-safe messages.json translation

適用於以下項目的 AI 在地化: messages.json files

上傳你的來源 messages.json,選擇目標語言,一次付費,下載可直接上架的 _locales ZIP。

占位符安全的翻譯
符合 WebExtension messages.json 規範
透明定價
messages.json
來源語言(範例)
{
  "appName": {
    "message": "My Extension",
    "description": "Name"
  },
  "welcomeMsg": {
    "message": "Hello, $USER$!",
    "placeholders": {
      "user": {
        "content": "$1"
      }
    }
  }
}
德文(輸出)
{
  "appName": {
    "message": "Meine Erweiterung",
    "description": "Name"
  },
  "welcomeMsg": {
    "message": "Hallo, $USER$!",
    "placeholders": {
      "user": {
        "content": "$1"
      }
    }
  }
}
52 locales

運作方式

只要三個簡單步驟即可在地化你的 browser extension。翻譯會在付款後開始執行——我們會將工作排入佇列,並在幾分鐘內產生 ZIP。

01

上傳

拖放你的來源 messages.json 檔案。我們會立即解析並驗證 browser extension 格式。

02

選擇語言並查看價格

從 52 種語言中選擇。付款前即可依檔案大小查看透明定價。

03

下載 ZIP

透過 Stripe 一次付費。我們會產生所有 _locales/{lang}/messages.json 檔案,並將它們打包成 ZIP。

即時定價示範

透明定價估算器

上傳前就能清楚知道你將支付的金額。最終報價會在上傳後,依字串長度與所選語言計算。

1. 上傳檔案

將 messages.json 拖曳到這裡

或點擊以瀏覽

messages.json input. Max 500KB.

2. 選擇語言

|

已選擇 55 種語言中的 3 種

3. 您的預估

已選擇的語言3

最終價格將於結帳頁面上傳檔案後計算

一次性付款 • 無訂閱

為開發者打造

專為 browser extension 語系格式打造。不是通用翻譯工具。

支援 WebExtension 格式

專為 browser extension 的 messages.json 結構打造,支援 message、description 與 placeholders。

佔位符保護

完整保留 $PLACEHOLDER$ 語法,不做任何變更。您的變數在所有語言中都能保持完整。

描述脈絡

我們會讀取您的 description 欄位,並將其作為脈絡提示,以提供更精準的 AI 翻譯。

可直接匯出 ZIP

下載包含正確 _locales/{lang}/messages.json 資料夾結構的 ZIP。直接放進您的擴充功能即可。

平行處理

所有語言同時翻譯。多數工作可在 5 分鐘內完成。

一次性付款

無訂閱、無月費。每次工作付一次,永久下載。

WebExtension 擴充功能 i18n 的運作方式

A messages.json entry pairs a key with a "message" string, an optional "description" used as translation context, and an optional "placeholders" map. LocalePack parses all three: it translates only the message text, forwards the description to the model as context, and returns $PLACEHOLDER$ and $1 substitution tokens byte-identical.

_locales/ 資料夾結構
_locales/
├── en/
│   └── messages.json   ← default_locale
├── de/
│   └── messages.json
├── fr/
│   └── messages.json
└── ja/
    └── messages.json
messages.json
{
  "appName": {
    "message": "My Extension",
    "description": "Extension name"
  },
  "greeting": {
    "message": "Hello, $USER$!",
    "placeholders": {
      "user": { "content": "$1" }
    }
  }
}

執行階段 API

chrome.i18n / browser.i18n

呼叫範例

getMessage("key")

在 manifest 中必填

"default_locale"

The same translated messages.json drops into _locales/{locale}/ for Chrome, Firefox, Edge, Opera and Safari without further edits.

messages.json format explained →

What the translator has to preserve

A messages.json entry is more than a key and a string. Getting these four pieces wrong is what breaks extensions after machine translation.

message
The user-visible string, and the only field that should ever change during translation.
description
Context for whoever — or whatever — translates the string. LocalePack feeds this to the model as translation context, so a good description measurably improves output quality.
placeholders
Named substitutions written as $PLACEHOLDER$ in the message, with their own content definitions. These must survive translation exactly, including the dollar signs and casing.
Positional substitutions
$1 through $9 map to arguments passed to getMessage(). A translator that reorders a sentence must keep these tokens intact, not renumber them.

Most generic translation tools treat $PLACEHOLDER$ and $1 as ordinary words. Once they are translated or reordered, the extension ships with broken interpolation.

為什麼不直接用通用工具?

通用翻譯工具不了解 browser extension 格式。

LocalePack
人工翻譯
通用 TMS
設定時間2 分鐘每種語言數小時30 分鐘以上
成本透明度
WebExtension 格式安全性
佔位符保護
速度(52 種語言)< 5 分鐘週小時
最適合Any messages.json file小型專案企業級 Web 應用程式

成功案例

使用 LocalePack 的真實專案,最多可支援 52 種語言,觸及全球受眾。

AstrologerAI AI astrology app localized into 52 languages

AstrologerAI: an AI astrology app localized into 52 languages

How the AstrologerAI app translated its entire experience into 52 languages with LocalePack — 6.3M tokens for $58.73 — to reach a worldwide audience in their own language.

DevToys.pro developer tools web app localized into 52 languages

DevToys.pro: 400% international traffic growth across 52 languages

How the DevToys.pro web app translated its entire UI into 52 languages with LocalePack — 5.8M tokens for $58.44 — and quadrupled its international organic traffic.

DevToys New Tab Chrome extension localized into 52 languages

DevToys New Tab: a Chrome extension localized UI + store listing in 52 languages

How the DevToys New Tab Chrome extension localized both its in-extension UI and its Chrome Web Store listing into 52 languages to reach a global audience.

The LocalePack site localized into 52 languages with LocalePack

LocalePack localized itself into 52 languages — with LocalePack

We used our own tool to translate the entire LocalePack site into 52 languages — 2.9M tokens for $27.37 — so developers worldwide find us in their own language.

查看所有成功案例

深受擴充功能開發者信賴

“幫我省下好幾個小時的繁瑣工作。上傳我的 messages.json,就能拿到完全符合我所需格式的完美翻譯。”

Sarah K.

獨立開發者,AdBlock 擴充功能

“Our $PLACEHOLDER$ tokens came back untouched in all 52 locales. That is the whole reason we stopped scripting it ourselves.”

Marcus T.

擴充功能維護者

“透明定價是我決定購買的關鍵。在上傳任何內容之前,我就清楚知道自己會付多少。”

Dev J.

開源貢獻者

52

支援的語系

100%

Placeholder 安全輸出

ZIP

可直接上線

常見問題

關於 LocalePack,你需要知道的一切。

Related developer guides

Deep dives on the formats, APIs and errors behind this page — written for developers, not translators.

messages.json format explained (with placeholders)

A complete reference for the WebExtension messages.json format: the message, description, and placeholders fields, $PLACEHOLDER$ syntax, $1 positional substitutions, and common mistakes.

Validate messages.json before shipping

How to catch every class of messages.json error before your users do: JSON syntax, missing required fields, missing keys across locales, malformed placeholder syntax, and manifest key mismatches.

__MSG_key__ in manifest.json explained

How the __MSG_key__ substitution syntax works in Chrome and Firefox extension manifests: which fields support it, how Chrome resolves tokens at load time, and the pitfalls that cause silent failures or upload rejections.

chrome.i18n.getMessage() returns empty

getMessage() returns an empty string when a message is missing, and logs nothing at all. Every cause of the silent empty string, how to tell it apart from undefined, and how to confirm each one.

Browse all guides →

準備好將你的 browser extension 推向全球了嗎?

一次付費 - 下載 ZIP - 全球上架

試用 LocalePack
LocalePack
指南隱私權條款支援

© 2025 LocalePack。保留所有權利。

本專案使用以下工具翻譯: LocalePack logoLocalePack