TranslationManager.GetOnDeviceTranslationCapabilities(Int32, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a set of TranslationCapability
s describing the capabilities for on-device
Translator
s.
[Android.Runtime.Register("getOnDeviceTranslationCapabilities", "(II)Ljava/util/Set;", "", ApiSince=31)]
public System.Collections.Generic.ICollection<Android.Views.Translation.TranslationCapability> GetOnDeviceTranslationCapabilities (int sourceFormat, int targetFormat);
[<Android.Runtime.Register("getOnDeviceTranslationCapabilities", "(II)Ljava/util/Set;", "", ApiSince=31)>]
member this.GetOnDeviceTranslationCapabilities : int * int -> System.Collections.Generic.ICollection<Android.Views.Translation.TranslationCapability>
Parameters
- sourceFormat
- Int32
data format for the input data to be translated.
- targetFormat
- Int32
data format for the expected translated output data.
Returns
A set of TranslationCapability
s.
- Attributes
Remarks
Returns a set of TranslationCapability
s describing the capabilities for on-device Translator
s.
These translation capabilities contains a source and target TranslationSpec
representing the data expected for both ends of translation process. The capabilities provides the information and limitations for generating a TranslationContext
. The context object can then be used by #createOnDeviceTranslator(TranslationContext, Executor, Consumer)
to obtain a Translator
for translations.
<strong>NOTE: </strong>Call on a worker thread.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.