Translate a Ruby on Rails app into Simplified Chinese
Manuce translates the values in your config/locales/*.yml files into Simplified Chinese and returns the same file, with the root locale key switched, ready to drop back into the project. Interpolations such as %{count} and %{name} are checked and keys are never touched. What lives outside the YAML — fonts, date formats, punctuation hard-coded in views — remains yours to adjust.
What it costs
For the language files of a Ruby on Rails app totalling about 3,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 changes when a Rails app goes Chinese
Simplified Chinese breaks three assumptions built into most Rails interfaces: plurals, word order and punctuation.
There is no plural. CLDR gives Chinese a single category, other. A pair such as one: \"%{count} comment\" / other: \"%{count} comments\" becomes one form, other: \"%{count} 条评论\", with a measure word (条, 个, 件, 位…) chosen to suit the noun. Mind how I18n behaves: with the default backend, count: 1 looks for one, and a missing key raises I18n::InvalidPluralizationData unless a Chinese plural rule is loaded (the rails-i18n gem provides one). Check this before release.
Variables move. “Welcome back, %{name}” becomes %{name},欢迎回来. As long as the whole sentence sits in one value, the translation can reorder it. If your code glues pieces together, e.g. t('.hello') + user.name, the Chinese will read awkwardly: merge it into a single value with interpolation.
No spaces, full-width punctuation. Chinese uses ,。:?! and does not separate words. The error format errors.format: \"%{attribute} %{message}\" is usually written \"%{attribute}%{message}\", giving 邮箱不能为空 rather than “邮箱 不能为空”.
What Manuce returns, and what it does not do
You get the same YAML file, in the same format. The root locale key (en:, fr: or whatever your source is) becomes the target's; indentation, key order, quotes, comments, line endings, encoding and BOM are preserved. Only the values change.
- Every translated value is compared with the source: a
%{count}interpolation or a tag inside an_htmlkey must come back intact. 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 marked as non-translatable.
- The report lists the strings translated and those left as they were, with the reason.
What Manuce does not do: it does not touch views or controllers, does not extract text hard-coded in your ERB templates, does not edit config.i18n.available_locales, and leaves formats such as \"%m/%d/%Y\" as they are. Traditional Chinese (Taiwan, Hong Kong) is a separate language, ordered on its own. Manuce does not produce sworn or certified translations either: if your terms of service need certification, use an accredited translator.
Chinese carries a surcharge (×1.6 on the per-word rate), applied only to words in values, with keys and tags excluded.
Preparing the files before upload
- Collect every source-language file: the main locale file, per-model or per-view files, and any gem locale files you have copied into the project, such as
devise.en.yml. A forgotten file means half-translated screens. - Get sentences out of the code. Look for strings hard-coded in views and for concatenated translations; turn them into one value with
%{variable}. - Move punctuation into the values. A view that renders
<%= t('.email') %>:will show邮箱:with a Latin colon. Put the colon in the value so it can become:. - Match the locale code. Check that the returned root key matches the code your app declares. If the project uses
zh-CN(the rails-i18n convention), align the key and the file name. - Prune dead keys: they add to the word count and serve no one.
Checking the Chinese interface once integrated
Fonts. A Latin web font has no Chinese characters, so the browser falls back to whatever it finds. Declare an explicit stack, for example font-family: \"PingFang SC\", \"Microsoft YaHei\", \"Noto Sans SC\", sans-serif;.
Length. Chinese text is two to three times shorter in characters, but each character is wider, so the space taken changes little and buttons usually fit. However, truncate(text, length: 40) counts characters: 40 hanzi carry far more meaning than 40 letters. Revisit those limits.
Dates and numbers. Formats are not translated. Set date.formats.default yourself, for instance \"%Y年%-m月%-d日\", and the unit in number.currency.format if you show prices in yuan.
Testing. Switch to I18n.locale = :zh (or your code), render a counter at 0, 1 and 2 to exercise pluralisation, trigger a few validation errors and read the emails sent by ActionMailer. A tool such as i18n-tasks will flag keys missing between the source and Chinese.
In practice
- Collect all source-language config/locales/*.yml files, including gem files copied into the project.
- Upload them to Manuce, choose Simplified Chinese and read the free sample.
- Download the translated files and the report, then align the root key with your locale code (zh or zh-CN).
- Set fonts, date formats and the plural rule, then test counters and error messages.
Frequently asked questions
Should I keep the one key in the Chinese file?
Chinese has a single form, other. If a Chinese plural rule is loaded (via rails-i18n, for example), other is enough. Otherwise the default I18n backend looks for one when count is 1 and raises an error if it is missing, so test that case before release.
Should the root key be zh or zh-CN?
Whichever your app declares in config.i18n.available_locales. Manuce replaces the source root key with the target language's; if your project follows the zh-CN convention, align the key and the file name before committing.
Are ActiveRecord validation and Devise messages translated?
Yes, if they are in the YAML files you upload. Text that ships inside a gem and is not present in your project is not covered, so copy the gem's locale file into config/locales first.
Can I get Traditional Chinese as well?
Yes, but Manuce treats it as a separate language to add to the order. Ordering two or more languages together brings a discount on the whole order.
How can I judge the quality before paying?
On upload you get an instant quote based on the exact word count and a free sample: one paragraph of your file translated at the level you chose. Have a Chinese speaker look at it if you can.
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.