Hey iOS developers! 👋
This week, we're exploring the new Apple Translation framework introduced at WWDC24. This framework allows developers to offer an in-app translation experience using either the built-in system UI or a custom UI.
Translation framework documentation
To display simple in-app translations, the translationPresentation
method can be used with the translation overlay. For a more customizable translation experience, Apple provides the TranslationSession
object with associated translation methods. In this case, the system downloads language translation models, upon user permission.
Read on Apple Developer
WWDC24: Meet the Translation API
Watch this WWDC24 session to discover how the Translation API works, including the supported languages and best practices for working with translation features in your app.
Watch on Apple Developer
Checking language availability for translation with the Translation framework
Matteo Altobello explores how to detect if a language is unavailable for translation using the LanguageAvailability
class. Interestingly, users can manually download or add language models via the Translate app.
Read on Create with Swift
Free, on-device translations with the Swift Translation API
Pol Piella Abadia has done an excellent job creating a sample app for implementing the Translation framework. He covers all currently available methods and provides SwiftUI code examples.
Read Pol Piella blog
Until next time!
Artjoms
Discussion about this post
No posts