Before iOS 26 DictationTranslator skipped every translation, while Settings let
Translate what I say be turned on and its language downloaded, so on iOS 18 every
dictation went in as spoken without a word. The TestFlight tester on an iPhone XR
(iOS 18.7.12, build 56) needs it with Chinese.
Apple's Translation framework is there on iOS 18 (LanguageAvailability,
TranslationSession.Configuration, prepareTranslation), but a TranslationSession
comes only from SwiftUI's translationTask; TranslationSession(installedSource:
target:), which DictationTranslator uses, is iOS 26.
- TranslationSessionHost: Hex's root view hosts a translationTask; each
translation queues its text, sets or invalidates the configuration for its pair,
and the task translates the queue with the session it gets. TranslationEngine
.hosted is set as the view appears, and DictationTranslator uses it before iOS 26
(the keyboard has none and doesn't translate there).
- iOS may not run the task, or the translation, while Hex is in the background (a
dictation finished from the keyboard). A translation not answered within 10 s
goes in as spoken with the new reason needsHexOpen, not retried; the keyboard's
note says "iOS 18 translates only with Hex open" and Settings says the last
dictation couldn't be translated while Hex was in the background.
- zh-Hans for both strings.
Verified (on origin/dev acf0f2b7): xcodebuild test on an iPhone SE (2nd
generation) iOS 26.2 simulator, 546 tests, 0 failures, 1 skipped, with
DictationControllerTests.testBeforeIOS26ATranslationWithoutHexsWindowSaysSo for the
reason, its copy and no retry. The simulator says Translation isn't supported on it,
so a hosted session translating, in the foreground and in the background, is
device-only.