Translate a Laravel app into Simplified Chinese
Upload your Laravel JSON language file (for example <code>lang/en.json</code>) and Manuce translates the values into Simplified Chinese, leaving keys, <code>:name</code> placeholders and tags untouched. You get the same file back, ready to rename for your Chinese locale, with a report listing what was translated and what was left as it was.
What it costs
For the language files of a Laravel app totalling about 2,500 words, into Chinese (Simplified):
To understand, internal use.
Ready to send, by the technical specialist.
Cross-checked. For documents that commit you.
Price for one language, original layout included. VAT not applicable — article 293 B of the French General Tax Code (CGI). The exact quote, based on your file's word count, is shown before you pay.
What Laravel expects from a Chinese locale
With JSON translations, Laravel uses the source string as the key: __('Welcome, :name') looks up the key "Welcome, :name" in the active locale's file. Your Chinese file must therefore keep exactly the same keys as the source; only the values change. That is how Manuce works: keys are never translated and are not counted in the price, which is based solely on the words in the values.
The file name follows whatever locale you pass to App::setLocale(). Pick one and stick to it, such as zh_CN, giving lang/zh_CN.json (or resources/lang/zh_CN.json on older Laravel versions). If your Blade layout builds the lang attribute from the locale by swapping the underscore for a hyphen, pages will output lang="zh-CN", which helps browsers pick a suitable Chinese font.
PHP array files (lang/en/validation.php, auth.php, pagination.php) are not supported. To translate them, convert them to JSON with flat keys such as "validation.required", then bring the result back into your project.
Chinese-specific traps in Laravel strings
- Placeholder order. Chinese sentences often reorder: "Order no. :number for :name" becomes
:name 的第 :number 号订单. Named placeholders allow this. A sentence assembled from several__()calls in Blade cannot be reordered, so merge it into one string before translation. - Plurals. Chinese has a single CLDR category (other) and Laravel, for
zh, always picks the first segment of atrans_choicestring. If a translated value keeps "1 comment|:count comments" as1 条评论|:count 条评论, the app will show "1 条评论" whatever the number. The correct value is one segment::count 条评论. Explicit ranges such as{0}or[2,*]still work. - Full-width punctuation. Chinese text uses
,。:?!with no surrounding spaces. "The :attribute field is required." becomes:attribute 不能为空。 - Capitalised placeholders.
:Nameand:NAMEhave no effect on Chinese characters but are kept as they are, since they matter when the inserted value is in Latin script. - Spacing between Chinese and Latin. Many mainland Chinese interfaces put a plain space between Chinese characters and digits or Latin words (
共 :count 条结果). Decide on one convention for the whole app.
Layout: fewer characters, not less space
A Chinese value has two to three times fewer characters than its English or French source, but each character is wider, so the space it takes on screen barely changes. Do not shrink buttons or columns based on character count.
Watch truncation: Str::limit() measures display width, and a Chinese character counts as two. Str::limit($title, 40) will cut at around twenty Chinese characters, which is visually consistent but may surprise you if you were thinking in characters.
A Latin font does not contain Chinese glyphs. If your CSS only declares a Latin web font, the browser falls back to a system font that may read poorly. Declare an explicit stack, for example "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif, and avoid very small font sizes in areas that will display Chinese.
What Manuce returns, and what it does not do
You get the same JSON file back: indentation, key order, quotes, line endings, encoding and BOM are preserved, and only the values change. Each translated value is checked against the source: if a placeholder such as :attribute or a tag such as <b> is missing or altered and the mismatch persists, the source value is kept and the report says so. Not translated: empty values, URLs, email addresses, numbers, colours, date formats (a Y-m-d stays Y-m-d), identifiers and anything you mark as non-translatable.
- Manuce does not translate strings hard-coded in Blade views or controllers; only strings that go through
__()and sit in the language file are covered. - It does not read PHP array files directly: convert them to JSON first.
- Traditional Chinese (Taiwan, Hong Kong) is a separate language: a
zh_TW.jsonfile is a separate order. - It does not provide certified (sworn) translation, for instance for terms and conditions that need legal standing in China.
Chinese carries a surcharge: a ×1.6 coefficient applies to the per-word rate.
Preparing the file and checking the result
- Start from your most complete JSON file, usually the source language, and make sure it is valid JSON.
- Note the plural strings (those containing
|) so you can check them after translation. - Once delivered, rename the file to
zh_CN.jsonand read the report: every value left in the source language should have an explanation you accept. - If a script later rewrites the file, use
JSON_UNESCAPED_UNICODE; without it,json_encode()writes\u6b22\u8fceinstead of欢迎, which is valid but unreadable in code review. - Switch the app to
zh_CNand walk through the forms: validation messages, pagination, password reset emails. Set Carbon to the same locale so dates read like3月5日.
In practice
- Export lang/en.json (or your source locale), converting any PHP translation arrays to JSON first.
- Upload the file to Manuce, choose Simplified Chinese and check the free sample.
- Download the translated file and its report, then rename it lang/zh_CN.json.
- Check plural strings, fonts and validation messages with the app running in zh_CN.
Frequently asked questions
Should the file be called zh.json or zh_CN.json?
Laravel loads the file whose name matches the active locale exactly. Either works as long as you pass the same value to App::setLocale(). zh_CN makes it clear the file is Simplified Chinese and leaves room for a later zh_TW.
My validation messages live in lang/en/validation.php. Can Manuce translate them?
Not in that form, as PHP arrays are not supported. Convert them to JSON with flat keys such as "validation.required", have that file translated, then bring the result back into your project. Include the attributes array too, otherwise :attribute will show the technical field name.
Could :name or :count be translated or dropped?
Every translated value is checked against the source for placeholders and tags. If a mismatch persists, the source value is kept and the report flags it. Placeholders may move within the sentence, which is normal in Chinese.
Why do my plurals always show the "1" form in Chinese?
For zh, Laravel always picks the first segment of a pipe-separated string. If that segment contains a hard-coded "1", it is shown for every number. Replace the value with a single segment that uses :count.
Can the same file be used for Taiwan or Hong Kong?
No. Traditional Chinese is a separate language at Manuce, with its own characters and usage. Order it separately and save it in its own file, such as zh_TW.json.
The specialist in charge
This subject goes to Dédale, the technical specialist. See how it works.
The same file, into another language
Into Chinese (Simplified), other files
See also
Try it on your own file, free
A sample of your file translated at the level you choose, before any payment. You judge, then you decide.