Android.Views.Translation Namespace
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.
Provides APIs for translating view content.
Classes
| Name | Description |
|---|---|
| TranslationCapability |
Capability class holding information for a pair of |
| TranslationCapability.InterfaceConsts |
Provides the parcelable interface constants inherited by TranslationCapability. |
| TranslationContext |
Info class holding information for |
| TranslationContext.Builder |
A builder for |
| TranslationContext.InterfaceConsts |
Provides the parcelable interface constants inherited by TranslationContext. |
| TranslationManager |
The |
| TranslationRequest |
Translation request sent to the translation service by the
|
| TranslationRequest.Builder |
A builder for |
| TranslationRequest.InterfaceConsts |
Provides the parcelable interface constants inherited by TranslationRequest. |
| TranslationRequestValue |
A value to be translated via |
| TranslationRequestValue.InterfaceConsts |
Provides the parcelable interface constants inherited by TranslationRequestValue. |
| TranslationResponse |
Response from the translation service, which contains the translated result. |
| TranslationResponse.Builder |
A builder for |
| TranslationResponse.InterfaceConsts |
Provides the parcelable interface constants inherited by TranslationResponse. |
| TranslationResponseValue |
A translated response value from translation service. |
| TranslationResponseValue.Builder |
A builder for |
| TranslationResponseValue.InterfaceConsts |
Provides the parcelable interface constants inherited by TranslationResponseValue. |
| TranslationSpec |
Specs and additional info for the translation data. |
| TranslationSpec.InterfaceConsts |
Provides the parcelable interface constants inherited by TranslationSpec. |
| Translator |
The |
| UiTranslationManager |
The |
| ViewTranslationRequest |
Wrapper class representing a translation request associated with a |
| ViewTranslationRequest.Builder |
A builder for building ViewTranslationRequest. |
| ViewTranslationRequest.InterfaceConsts |
Provides the parcelable interface constants inherited by ViewTranslationRequest. |
| ViewTranslationResponse |
Wrapper class representing a translation response associated with a |
| ViewTranslationResponse.Builder |
A builder for |
| ViewTranslationResponse.InterfaceConsts |
Provides the parcelable interface constants inherited by ViewTranslationResponse. |
Interfaces
| Name | Description |
|---|---|
| IUiTranslationStateCallback |
Callback for listening to UI Translation state changes. |
| IViewTranslationCallback |
Callback for handling the translated information show or hide in the |
Enums
| Name | Description |
|---|---|
| TranslationContextFlags |
Specifies optional settings for a translation context. |
| TranslationDataFormat |
Specifies the format of translation data. |
| TranslationRequestFlags |
Specifies the requested translation results and whether partial responses are accepted. |
| TranslationResponseStatus |
Specifies the result status of a translation request. |
| TranslationResponseValueStatus |
Specifies whether an individual value was translated successfully. |
| TranslationState |
Specifies the availability of translation between a source and target specification. |
Remarks
Use TranslationManager to query on-device translation capabilities and create a Translator for a source and target TranslationSpec. A TranslationContext supplies these specifications and translation settings.
TranslationRequest and TranslationResponse carry values to translate and their results. View-specific requests and responses associate these values with a view's autofill identifier. IViewTranslationCallback controls how a view shows, hides, or clears translated content.
UiTranslationManager and IUiTranslationStateCallback provide access to UI translation state changes. Their callback overloads have different Android version requirements; use the availability information on each member.