ManuceTranslate a fileTranslate a Symfony app into Simplified Chinese

Translate a Symfony app into Simplified Chinese

Upload your Symfony translation files in XLIFF or YAML: Manuce translates the values into Simplified Chinese and leaves keys, <code>%name%</code> and <code>{name}</code> placeholders and file structure exactly as they were. You get the same file back, ready to drop into <code>translations/</code>, with a report on what was translated and what was left alone.

Upload my file See pricing

What it costs

For the language files of a Symfony app totalling about 3,000 words, into Chinese (Simplified):

Essentiel
€28

To understand, internal use.

Professional
€87

Ready to send, by the technical specialist.

Premium
€168

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.

Choosing the Chinese locale in Symfony

Symfony takes the locale from the file name: messages.zh_CN.xlf, messages.zh.yaml or messages.zh_Hans.xlf, depending on what your routes, _locale parameter and translator configuration use. If a request comes in as zh_CN and only a zh file exists, Symfony falls back to it, then to your configured fallback locales. Pick one convention and use it everywhere, URL prefixes included (/zh/ or /zh-cn/).

Traditional Chinese (zh_TW, zh_HK) is not something you derive from Simplified: it is a different script and, at Manuce, a separate language. A file named plain zh may, depending on your fallbacks, be served to visitors from Taiwan; naming it zh_CN or zh_Hans avoids that.

Domains shipped with Symfony components, such as the Validator constraint messages and the Security messages, already exist in Simplified Chinese. Only your own domains need translating: messages, custom constraint messages, email templates.

Chinese inside your strings: plurals, punctuation, word order

Plurals. Chinese has a single CLDR category, other: 1 件商品 and 3 件商品 use the same form. Two Symfony cases need attention:

  • ICU format (messages+intl-icu.zh_CN.xlf): in {count, plural, one {…} other {# 件商品}}, the one branch is never selected for Chinese, so other must be complete. Explicit cases such as =0 still apply.
  • Legacy pipe syntax: with the short form One item|%count% items, Symfony only uses the first segment for Chinese. Translated literally, 一件商品 would appear for five items. Switch to intervals {0}…|{1}…|]1,Inf[… or to ICU before uploading.

Full-width punctuation. Email address: becomes 电子邮箱: with no space. If the colon sits in your Twig template after {{ label|trans }}, it stays half-width Latin: move it into the value.

Word order. A sentence built in Twig from fragments (You have, %count%, messages) cannot be reordered for Chinese. A whole string with a placeholder, You have %count% messages, becomes 您有 %count% 条消息.

Register. The polite 您 is usual for customer-facing interfaces; 你 suits a younger or casual audience. Check which you get on the free sample.

What Manuce returns, and what it does not do

  • Both .xlf and .yaml files are supported. The returned file is the same file: indentation, key order, quotes, comments, line endings, encoding and BOM are preserved; only the values change.
  • Every translated value is checked against the source for %name% and {name} placeholders and tags. If a mismatch persists, the source value is kept and the report says so.
  • Not translated: keys, empty values, URLs, email addresses, numbers, colours, date formats, identifiers and anything you mark as untranslatable.
  • Pricing counts the words in the values only, excluding keys and tags; Chinese carries a ×1.6 language coefficient.

Manuce does not edit your Twig templates, CSS or configuration, and does not convert one plural syntax into another. Text hard-coded in a controller or template is not seen: only the files you upload are translated. Nor does Manuce produce sworn or certified translations; for terms and conditions needed in an official procedure in China, use an accredited translator.

Twig, fonts and layout: what stays on your side

  • Fonts. A Latin web font has no Chinese characters, so the browser picks whatever system font it finds. Add an explicit fallback, for instance font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;.
  • Language attribute. Output lang=zh-CN (or zh-Hans) on the html element from app.request.locale, so browsers choose the right glyphs and line breaking.
  • Width. Chinese text has two to three times fewer characters, but each is wider, so the space taken changes little. Buttons usually fit; line height is the more common problem, often too tight for hanzi.
  • Styles that do nothing. text-transform: uppercase has no effect on Chinese and synthetic italics read poorly: use bold for emphasis.
  • Dates. Date formats are not translated. A |date('m/d/Y') stays as it is; with Twig Intl's format_date and the zh_CN locale you get 2024年5月3日.

Preparing the file and checking it afterwards

  1. Refresh your source files with php bin/console translation:extract (formerly translation:update) so nothing is missing.
  2. Convert short-form plurals, move punctuation from templates into values and replace fragmented sentences with whole strings.
  3. Mark product or brand names that must stay in Latin script as untranslatable.
  4. Request the free sample to check register and punctuation.
  5. On return, name the file for your locale (messages.zh_CN.xlf), clear the cache, run php bin/console debug:translation zh_CN and read the report: every string left in the source language is explained.

In practice

  1. Extract and refresh the app's source translation files.
  2. Fix short-form plurals, punctuation in Twig and fragmented sentences.
  3. Upload the .xlf or .yaml, check the free sample and accept the quote.
  4. Name the returned file zh_CN, clear the cache and run debug:translation.
  5. Add a Chinese fallback font and review the screens.

Frequently asked questions

Should the file be called zh, zh_CN or zh_Hans?

All three work as long as your route locale matches. zh_CN or zh_Hans stop Traditional Chinese visitors falling back to Simplified. What matters is using the same value throughout.

Can my %count% and {name} placeholders get broken?

Each translated value is compared with the source, placeholders and tags included. If a mismatch persists, the source value is kept and flagged in the report so you can fix it by hand.

Do I need to translate validation messages?

Messages for Symfony's built-in constraints already exist in Simplified Chinese. Only your custom messages need translating, in your own domain file.

What about Taiwan or Hong Kong?

Traditional Chinese is a separate language at Manuce and is ordered on its own, giving you a second file such as messages.zh_TW.xlf. Ordering several languages together qualifies for the multi-language discount on the whole order.

Why does Chinese cost more per word?

Chinese is a surcharged language with a ×1.6 coefficient on the per-word price. Words are counted in the source values only, without keys or tags.

The specialist in charge

This subject goes to Dédale, the technical specialist. See how it works.

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.

Upload my file