Translate a Java (Spring) app into Simplified Chinese
Manuce translates the values in your Spring messages.properties files into Simplified Chinese and returns the same file, ready to drop in as messages_zh_CN.properties. Keys, {0} placeholders, \uXXXX escapes, comments and encoding stay where they were, and a report lists every string left untouched and why.
What it costs
For the language files of a Java (Spring) app totalling about 2,000 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 Chinese changes in your Spring messages
Chinese has a single CLDR plural category, other. A value such as cart.items={0} items becomes cart.items=购物车中有 {0} 件商品: no singular form, but a measure word before the noun (件 for objects, 条 for messages, 个 as a general-purpose classifier). If you rely on a pattern like {0,choice,0#no items|1#one item|1<{0} items}, its branches will read almost identically in Chinese, and you can simplify it in code once the translation is back.
Punctuation switches to full-width forms: , 。 : ?. Error: file not found. becomes 错误:找不到文件。. There are no spaces between words; whether to put a space between a Chinese character and a number or placeholder varies by project, so pick one convention and keep it.
Register: in a business interface aimed at mainland China, the polite 您 is usually preferred to 你. Button labels are very short: 保存 (save), 取消 (cancel), 删除 (delete).
Length: Chinese text uses two to three times fewer characters than English or French, but each character is wider, so the space taken on screen changes little. What does change is line breaking, since the browser may break between almost any two characters.
Encoding, escapes and file naming: the Java-specific traps
Properties.load(InputStream) has always read files as ISO-8859-1, which contains no Chinese characters at all. That is why many projects store non-Latin text as escapes, for instance \u4fdd\u5b58 for 保存. Since Java 9, ResourceBundle reads .properties files as UTF-8, and Spring Boot sets spring.messages.encoding to UTF-8 by default. A hand-configured ResourceBundleMessageSource or an older build step may still expect ISO-8859-1, though.
So check how the file is saved and read before you upload it:
- if it is UTF-8, the Chinese characters will be written as they are;
- if your project uses
\uXXXXescapes, Manuce keeps them wherever they are used; - an ISO-8859-1 file without escapes cannot hold hanzi, so convert it to UTF-8 first.
File naming: for Simplified Chinese the usual name is messages_zh_CN.properties (matching Locale.SIMPLIFIED_CHINESE), or messages_zh.properties if you do not separate variants. Spring looks for zh_CN, then zh, then the default file. The catch: a browser set to zh-TW also falls back to messages_zh.properties and will show Simplified Chinese to a reader in Taiwan. Traditional Chinese is a separate language at Manuce, ordered on its own and stored in messages_zh_TW.properties.
What Manuce returns, and what it does not do
You upload your messages file (messages.properties, messages_en.properties or whichever is your source) and get the same file back in the same format: indentation, key order, quotes, comments, line endings, encoding and BOM preserved. Only the values change.
- Placeholders such as
{0}and{1}, and any tags inside values, are checked against the source string by string. If a Chinese value drops a{1}and the mismatch persists, the source value is kept and the report says so. - MessageFormat apostrophes are handled:
Can''t open {0}will not leave a stray quote that stops{0}from being replaced. - Continuation lines ending in a backslash remain valid.
- Not translated: keys, empty values, URLs, email addresses, numbers, colours, date formats, identifiers and anything you mark as non-translatable. A line such as
date.pattern=MM/dd/yyyystays as it is.
The accompanying report lists translated strings and those left as they were, with the reason. Pricing is based on the words in the values, keys and tags excluded, with the ×1.6 coefficient that applies to Chinese.
Manuce does not touch your code: it does not set up a LocaleResolver, translate text hard-coded in Thymeleaf templates or Java classes, change date patterns or install fonts. Nor does it produce sworn or certified translations; if legal notices need certifying, use a sworn translator.
Preparing the file and checking before release
- Fonts. Latin fonts have no Chinese glyphs. Server-generated PDFs (JasperReports, OpenPDF) and images drawn with Java2D will show empty boxes if no CJK font is available. Bundle a font such as Noto Sans CJK SC, including in your Docker image, and reference it in your document templates.
- Dates and numbers. Patterns are left as in the source, so adapt them yourself, for example to
yyyy-MM-ddoryyyy年M月d日, or letDateTimeFormatter.ofLocalizedDatechoose based on the locale. - Non-translatable text. Mark anything that must stay in Latin script: brand names, product codes, module names.
- Testing. Call the app with
Accept-Language: zh-CNor yourLocaleChangeInterceptorparameter, then go through validation messages, emails and menus. - Layout. Check narrow columns and tooltips, where a break between characters can push a
。or,to the start of a line.
To judge the output before paying, the free sample translates one paragraph of your file at the chosen level; pick a section with placeholders and error messages.
In practice
- Check the source file's encoding (UTF-8 or \uXXXX escapes) and mark values that must not be translated.
- Upload the .properties file: the quote appears straight away, based on the words in the values.
- Request the free sample to judge the Chinese output, then place the order.
- Rename the returned file to messages_zh_CN.properties and put it next to your other message files.
- Test with Accept-Language: zh-CN and check fonts, dates and layout.
Frequently asked questions
Should the file be called messages_zh or messages_zh_CN?
For Simplified Chinese, messages_zh_CN.properties is the more precise choice. With only messages_zh.properties, users on zh-TW will also get Simplified Chinese, because Spring falls back from zh_TW to zh. If Traditional Chinese is planned, keep the two variants in separate files.
Will the Chinese text be written in plain characters or as \uXXXX escapes?
The returned file keeps the source's encoding and BOM, and \uXXXX escapes are preserved where they are used. The simplest route is a UTF-8 source file, which Spring Boot reads as it is. If your toolchain requires escapes everywhere, a Maven or Gradle plugin can generate them afterwards.
How are plurals handled in Chinese?
Chinese has one form only (CLDR category other); quantity is expressed with a measure word such as 件 or 条. Placeholders in every value are checked against the source. Review your choice patterns after translation, as they can often be simplified in code.
Why does Chinese cost more than some other languages?
Chinese carries a ×1.6 coefficient on the per-word rate. Only the words in the values are counted, not keys or tags. The exact quote is shown as soon as you upload the file.
Can I also get Traditional Chinese for Taiwan or Hong Kong?
Yes, but Manuce treats it as a separate language, added as a second target. The multi-language discount then applies to the whole order, 20% off for two languages. Store that file as messages_zh_TW.properties.
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.