iOS 18: Apple's Translation API
Article Summary
activesludge breaks down iOS 18's Translation API with real-world demos that show how to eliminate copy-paste translation workflows. This is the most practical guide I've seen for implementing on-device translation.
Apple's new Translation API in iOS 18 lets developers embed translation directly into their apps with both system UI overlays and custom implementations. The author built a complete demo app showcasing legal disclaimers, real estate listings, contact forms, and surveys—all with in-app translation that works entirely on-device.
Key Takeaways
- Three implementation modes: overlay UI, replace text, or fully custom translation flows
- Batch translation processes multiple strings while preserving order using clientIdentifier
- All translations happen on-device after language packs download (no constant internet needed)
- Default config auto-detects source language and targets user's region or preferred language
- Gotcha: Custom UI features fail silently without Translate app installed (no way to check)
iOS 18's Translation API makes on-device translation trivial to implement, but requires iOS 18+ and careful handling of language pack downloads and app dependencies.
About This Article
Developers didn't know how the Translation API would behave on different devices. activesludge found that custom UI features fail silently when Apple's Translate app isn't installed, but there's no way to check if the app is available before trying to use it.
activesludge built a demo project on GitHub with three implementation categories: System UI, Custom UI, and Availability checks. It includes code examples for translating single strings, batch processing, and sequential translation using TranslationSession and LanguageAvailability classes.
The guide shows that default configuration auto-detects the source language and targets the user's region or preferred language. Developers can implement on-device translation with minimal code. Language pack downloads need internet the first time, but after that there's no dependency on translation services.