LocalePack
ChromeFirefoxEdgeOperaSafariDanh sách CWS
Vue.jsReact
Next.jsi18nextReact Native
Hướng dẫn cho lập trình viênCác câu chuyện thành công
Placeholder-safe messages.json translation

Bản địa hóa bằng AI cho messages.json files

Tải lên messages.json nguồn, chọn ngôn ngữ đích, thanh toán một lần và tải xuống ZIP _locales sẵn sàng phát hành.

Bản dịch an toàn với placeholder
Tuân thủ WebExtension messages.json
Giá cả minh bạch
messages.json
Ngôn ngữ nguồn (ví dụ)
{
  "appName": {
    "message": "My Extension",
    "description": "Name"
  },
  "welcomeMsg": {
    "message": "Hello, $USER$!",
    "placeholders": {
      "user": {
        "content": "$1"
      }
    }
  }
}
Tiếng Đức (đầu ra)
{
  "appName": {
    "message": "Meine Erweiterung",
    "description": "Name"
  },
  "welcomeMsg": {
    "message": "Hallo, $USER$!",
    "placeholders": {
      "user": {
        "content": "$1"
      }
    }
  }
}
52 locales

Cách hoạt động

Ba bước đơn giản để bản địa hóa browser extension của bạn. Bản dịch chạy sau khi thanh toán—chúng tôi xếp hàng tác vụ và tạo ZIP trong vài phút.

01

Tải lên

Thả tệp messages.json nguồn của bạn. Chúng tôi phân tích ngay lập tức và xác thực định dạng browser extension.

02

Chọn ngôn ngữ & xem giá

Chọn từ 52 ngôn ngữ. Xem giá minh bạch dựa trên kích thước tệp trước khi bạn thanh toán.

03

Tải xuống ZIP

Thanh toán một lần qua Stripe. Chúng tôi tạo tất cả các tệp _locales/{lang}/messages.json và gói chúng thành một ZIP.

Bản demo giá theo thời gian thực

Công cụ ước tính giá minh bạch

Xem chính xác số tiền bạn sẽ trả trước khi tải lên. Báo giá cuối cùng được tính sau khi tải lên dựa trên độ dài chuỗi và các ngôn ngữ đã chọn.

1. Tải tệp lên

Thả messages.json vào đây

hoặc nhấp để duyệt

messages.json input. Max 500KB.

2. Chọn ngôn ngữ

|

Đã chọn 3 trong 55 ngôn ngữ

3. Ước tính của bạn

Số ngôn ngữ đã chọn3

Giá cuối cùng được tính sau khi tải tệp lên ở trang thanh toán

Thanh toán một lần • Không cần đăng ký

Dành cho lập trình viên

Được thiết kế chuyên biệt cho định dạng locale của browser extension. Không phải công cụ dịch thuật chung chung.

Hiểu định dạng WebExtension

Được xây dựng riêng cho cấu trúc messages.json của browser extension với hỗ trợ message, description và placeholders.

Bảo vệ placeholder

Giữ nguyên cú pháp $PLACEHOLDER$ đúng như hiện có. Các biến của bạn luôn được bảo toàn trên mọi ngôn ngữ.

Ngữ cảnh từ mô tả

Chúng tôi đọc các trường description của bạn và dùng chúng làm gợi ý ngữ cảnh để AI dịch chính xác hơn.

Xuất ZIP sẵn sàng

Tải xuống một tệp ZIP với cấu trúc thư mục _locales/{lang}/messages.json chính xác. Thả vào tiện ích của bạn.

Xử lý song song

Tất cả ngôn ngữ được dịch đồng thời. Hầu hết tác vụ hoàn tất trong dưới 5 phút.

Thanh toán một lần

Không đăng ký, không phí hàng tháng. Trả một lần cho mỗi tác vụ, tải xuống mãi mãi.

Cách i18n của tiện ích WebExtension hoạt động

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.

Cấu trúc thư mục _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 thời gian chạy

chrome.i18n / browser.i18n

Ví dụ gọi

getMessage("key")

Bắt buộc trong 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.

Vì sao không dùng công cụ chung?

Các công cụ dịch thuật đa dụng không hiểu định dạng browser extension.

LocalePack
Dịch thủ công
TMS chung
Thời gian thiết lập2 phútVài giờ mỗi ngôn ngữ30+ phút
Minh bạch chi phí
An toàn định dạng WebExtension
Bảo vệ placeholder
Tốc độ (52 ngôn ngữ)< 5 phútTuầnGiờ
Phù hợp nhất choAny messages.json fileDự án nhỏỨng dụng web doanh nghiệp

Các câu chuyện thành công

Các dự án thực tế đã dùng LocalePack để tiếp cận khán giả toàn cầu với tối đa 52 ngôn ngữ.

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.

Xem tất cả câu chuyện thành công

Được các nhà phát triển tiện ích mở rộng tin dùng

“Giúp tôi tiết kiệm hàng giờ làm việc tẻ nhạt. Tải lên messages.json của tôi và nhận lại bản dịch hoàn hảo đúng theo định dạng tôi cần.”

Sarah K.

Dev độc lập, tiện ích AdBlock

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

Marcus T.

Người duy trì tiện ích mở rộng

“Giá minh bạch là điểm thuyết phục tôi. Tôi biết chính xác mình sẽ trả bao nhiêu trước khi tải lên bất cứ thứ gì.”

Dev J.

Cộng tác viên mã nguồn mở

52

Ngôn ngữ được hỗ trợ

100%

Đầu ra an toàn với placeholder

ZIP

Sẵn sàng phát hành

Câu hỏi thường gặp

Mọi điều bạn cần biết về 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 →

Sẵn sàng phát hành browser extension của bạn trên toàn cầu?

Thanh toán một lần - Tải ZIP - Phát hành toàn cầu

Dùng thử LocalePack
LocalePack
Hướng dẫnQuyền riêng tưĐiều khoảnHỗ trợ

© 2025 LocalePack. Bảo lưu mọi quyền.

Dự án này được dịch bằng LocalePack logoLocalePack