Translation class

Translation of the extracted content.

Holds the translated rendition of ExtractedDocument::content and (when preserve_markup was requested) the translated formatted_content. Chunks are translated in place inside ExtractedDocument::chunks[*].content rather than duplicated here.

Constructors

Translation({required String targetLang, String? sourceLang, required String content, String? formattedContent})
const

Properties

content → String
Translated plain-text body. Matches the shape of ExtractedDocument::content.
final
formattedContent → String?
Translated markup body (Markdown / HTML / etc.) when preserve_markup was enabled on the config. None otherwise.
final
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sourceLang → String?
BCP-47 source language. None when the translation backend was asked to detect.
final
targetLang → String
BCP-47 language tag the translation was produced into (e.g. "de", "fr-CA").
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override