Skip to main content

Case study: Prettier docs in 7 languages

· 4 min read
PageTurner Team
Research & Engineering

Prettier is one of the most widely used code formatters in the JavaScript ecosystem, with over 48,000 GitHub stars. Its documentation covers installation, configuration, editor integration, language support, and API reference — a mix of prose, code samples, and configuration examples that makes translation non-trivial.

We translated the entire Prettier documentation site into 7 languages: German, Spanish, French, Japanese, Korean, Swedish, and Chinese (Simplified).

Browse the live demo →

Why Prettier is a good test case

Prettier's docs present several challenges that generic translation tools struggle with:

  • Dense technical vocabulary. Terms like "trailing commas," "bracket spacing," and "prose wrap" need consistent, accurate translation across dozens of pages.
  • Code-heavy content. Configuration examples, CLI commands, and API code blocks appear on nearly every page. None of it should be translated.
  • Mixed content types. The site includes Markdown prose, JSX components, YAML frontmatter, JSON configuration examples, and inline code references — all interleaved.
  • Cross-references. Pages reference each other extensively. Links must continue to work after translation.

If a translation system can handle Prettier cleanly, it can handle most technical documentation.

What the output looks like

The translated sites preserve the full Prettier navigation structure. In Japanese, for example:

  • "What is Prettier?" becomes "Prettierとは?"
  • "Install" becomes "インストール"
  • "Options" becomes "オプション"
  • Sidebar categories like "Usage," "Configuring Prettier," and "Editors" are all translated

Every page, sidebar label, and breadcrumb is in the target language. The site doesn't mix English and translated labels the way partially localized sites often do.

Code blocks

Code blocks are completely untouched. A configuration example like:

{
"trailingComma": "es5",
"tabWidth": 4,
"semi": false,
"singleQuote": true
}

appears identically in all 7 translated versions. No translated keys, no garbled syntax, no broken formatting.

Inline code and technical terms

References to CLI flags like --single-quote, configuration keys like proseWrap, and file names like .prettierrc are preserved as code spans in every language. The surrounding prose is translated; the code is not.

Internal links between Prettier docs pages continue to work in every language. External links (to GitHub, npm, etc.) are unchanged.

Term consistency

One of the hardest problems in technical translation is keeping terminology consistent across a large site. "Trailing comma" should translate to the same phrase on the Options page, the CLI page, and the Migration Guide.

Prettier's docs use dozens of configuration-specific terms repeatedly. PageTurner builds a terminology dictionary before translating and enforces it across every page. The result: technical terms are consistent throughout the site, not just within individual pages.

What we learned

Small sites can be deceptively complex. Prettier's documentation isn't huge — around 50 pages — but the density of technical content per page is high. Page count alone doesn't predict translation difficulty.

Configuration documentation is harder than tutorials. Pages that list options with code examples and edge cases require more precision than narrative explanations. Every code reference must be preserved exactly.

7 languages at once is a good stress test. Translating into a single language can hide consistency issues. When the same content goes into 7 languages simultaneously, any inconsistency in the pipeline becomes immediately visible.

Try it yourself

Browse the translated Prettier docs and see the output firsthand:

Prettier is one of 19 open source projects we've translated as live demos.

If you maintain an open source project and want multilingual docs — at no cost — apply to the Founding Partner Program. For commercial projects, contact us for a free sample translation.