AI-generated Key Takeaways
-
Translation is the entry point for getting a Translator to translate between specified source and target languages.
-
A Translator is created using the
getClient(TranslatorOptions)method. -
The
getClientmethod returns a new Translator instance capable of translating based on the provided options. -
Resources used by a Translator should be released by calling the
close()method.
Entry point to get a Translator for
translating from the source language to the target language specified in options.
An Translator is
created via
getClient(TranslatorOptions).
Example:
Translator translator = Translation.getClient(options); Public Method Summary
| static Translator |
getClient(TranslatorOptions
options)
Returns a new instance of
Translator
that can translate from the source language to the target language (both
specified in options).
|
Inherited Method Summary
Public Methods
public static Translator getClient (TranslatorOptions options)
Returns a new instance of Translator
that can translate from the source language to the target language (both specified in
options).
To release the resources associated with a Translator, you need to ensure that
close()
is called on the resulting Translator
object once it will no longer be used.