PalantirPalantirExplainer
Frontend Engineering at Palantir: Engineering Multilingual Collaboration
Summary
Palantir describes the frontend work behind adding read-only translation mode to Dossier, a collaborative rich-text editor used in multilingual, restrictive environments where public translation services may be unavailable or disallowed. The design lets users choose source and target languages, view a complete document in translation, copy text, and add comments while routing requests through the in-house Language Model Service. Engineers extracted shared translation components, added a Redux state slice and per-element cache, chunked content by paragraphs and other blocks, and used Intersection Observer, batching, debouncing, and caching to translate visible content incrementally; edits invalidate affected translations and trigger retranslation. To preserve sentence-level quality, inline formatting is stripped before translation, so the current translated view is plain text. The resulting mode is available in every Dossier, translating content lazily as users scroll and updating translated blocks when collaborators edit the document.
Context
Dossier needed translation for multilingual collaboration in defense and intelligence environments where users may work on closed or classified networks and cannot use standard public translation tools. Its long, richly formatted documents and live collaborative editing created additional challenges beyond the translation already implemented in Chat and Slides.
Approach / What changed
The implementation uses shared translation components extended for Dossier’s nested rich-text structures, a dedicated Redux state slice, per-block translation caching, and block-level chunking. Intersection Observer triggers lazy translation for visible blocks, while batching, debouncing, and caching reduce duplicate work. Collaborative edits invalidate affected cache entries and trigger retranslation. Inline formatting is stripped before requests are sent to the in-house Language Model Service to preserve sentence context and translation quality.
Takeaways
Block-level chunking provides incremental translation for paragraphs, list items, and table cells while retaining more context than word- or sentence-level requests.
Intersection Observer limits translation requests to blocks in the viewport; batching, debouncing, and caching help avoid duplicate work for large documents and concurrent users.
Inline formatting is currently removed before translation because splitting formatted text can damage sentence context; the translated view is therefore plain text, with richer formatting support under consideration.
Source and freshness
- Source
- blog.palantir.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.