init(sourceLanguage:targetLanguage:sourceAttributedText:targetAttributedText:clientIdentifier:)
Creates an instance of a translation response with formatted text.
Declaration
init(sourceLanguage: Locale.Language, targetLanguage: Locale.Language, sourceAttributedText: AttributedString, targetAttributedText: AttributedString, clientIdentifier: String? = nil)Discussion
You don’t normally use this initializer directly. Instead, let the translation functions create instances of this type for you. Use this initializer when you want to create sample response for a test, for example in a SwiftUI preview.