AI & automation · Personal project
CompletedPolyGlotPDF
AI-powered document translation.
The context
Project overview
PolyGlotPDF is a web application I built for AI-assisted PDF translation and document questions. Users can upload a PDF, choose a target language, preview the translated content and download the result. The app is completed and live.
The problem
Translating a document involves more than submitting a block of text. A useful application needs to handle the file, make processing progress clear and give the user a way to read, export and ask questions about the translated content.
How it comes together
Technical approach
A React and TypeScript interface coordinates file handling, language selection, translation progress and output. Dedicated PDF and AI service modules separate document processing from model requests. The document chat receives translated content as context for follow-up questions.
Implementation & scope
Implemented
- PDF upload and target-language selection
- AI-assisted document translation with Google Gemini
- Explicit reading, translating, generating, success and error states
- Translated document preview and PDF download
- Document-aware AI questions and answers
- Sanitised generated markup before rendering
- Published web application at polyglotpdf.com
Engineering decisions
Separate the file workflow from model calls
PDF processing and AI requests live in distinct service modules, keeping the interface focused on the user journey rather than mixing every responsibility into the upload component.
Make long-running work visible
Typed processing states distinguish reading the file, translating it and generating the result. Errors have a separate state instead of leaving the interface looking as though work is still progressing.
Treat generated content as input
Generated HTML is sanitised before it reaches the document preview. Model output needs an explicit rendering boundary rather than being trusted as application markup.
Challenges & lessons
Coordinating a multi-step document journey
File reading, translation, preview and export need to agree on the active document and current state. Separating these steps makes failures easier to explain to the user.
Connecting questions to the document
The question-and-answer interface sends the translated content with the conversation, so the workflow stays centred on the document being explored.
What I’m taking forward
AI document tools still depend on ordinary application engineering: clear state, useful failure handling, careful content rendering and a reliable path from input to output.
Where it stands
Completed and live at polyglotpdf.com. The application supports PDF translation, document preview, export and AI document questions.
Case study last reviewed 26 November 2026
Visit live app
