Translator.Translate 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.
Requests a translation for the provided TranslationRequest
using the Translator's
source spec and destination spec.
[Android.Runtime.Register("translate", "(Landroid/view/translation/TranslationRequest;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetTranslate_Landroid_view_translation_TranslationRequest_Landroid_os_CancellationSignal_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=31)]
public virtual void Translate (Android.Views.Translation.TranslationRequest request, Android.OS.CancellationSignal? cancellationSignal, Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer callback);
[<Android.Runtime.Register("translate", "(Landroid/view/translation/TranslationRequest;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetTranslate_Landroid_view_translation_TranslationRequest_Landroid_os_CancellationSignal_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=31)>]
abstract member Translate : Android.Views.Translation.TranslationRequest * Android.OS.CancellationSignal * Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
override this.Translate : Android.Views.Translation.TranslationRequest * Android.OS.CancellationSignal * Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
Parameters
- request
- TranslationRequest
TranslationRequest
request to be translate.
- cancellationSignal
- CancellationSignal
signal to cancel the operation in progress.
- executor
- IExecutor
Executor to run callback operations
- callback
- IConsumer
Consumer
to receive the translation response. Multiple responses may
be received if TranslationRequest#FLAG_PARTIAL_RESPONSES
is set.
- Attributes
Remarks
Requests a translation for the provided TranslationRequest
using the Translator's source spec and destination spec.
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.