@@ -91,15 +91,19 @@ public LanguageTranslatorService(string versionDate, Authenticator authenticator
91
91
/// <summary>
92
92
/// Translate.
93
93
///
94
- /// Translates the input text from the source language to the target language.
94
+ /// Translates the input text from the source language to the target language. A target language or translation
95
+ /// model ID is required. The service attempts to detect the language of the source text if it is not specified.
95
96
/// </summary>
96
97
/// <param name="callback">The callback function that is invoked when the operation completes.</param>
97
98
/// <param name="text">Input text in UTF-8 encoding. Multiple entries will result in multiple translations in
98
99
/// the response.</param>
99
- /// <param name="modelId">A globally unique string that identifies the underlying model that is used for
100
- /// translation. (optional)</param>
101
- /// <param name="source">Translation source language code. (optional)</param>
102
- /// <param name="target">Translation target language code. (optional)</param>
100
+ /// <param name="modelId">The model to use for translation. For example, `en-de` selects the IBM provided base
101
+ /// model for English to German translation. A model ID overrides the source and target parameters and is
102
+ /// required if you use a custom model. If no model ID is specified, you must specify a target language.
103
+ /// (optional)</param>
104
+ /// <param name="source">Language code that specifies the language of the source document. (optional)</param>
105
+ /// <param name="target">Language code that specifies the target language for translation. Required if model ID
106
+ /// is not specified. (optional)</param>
103
107
/// <returns><see cref="TranslationResult" />TranslationResult</returns>
104
108
public bool Translate ( Callback < TranslationResult > callback , List < string > text , string modelId = null , string source = null , string target = null )
105
109
{
@@ -716,15 +720,18 @@ private void OnListDocumentsResponse(RESTConnector.Request req, RESTConnector.Re
716
720
/// <param name="file">The contents of the source file to translate.
717
721
///
718
722
/// [Supported file
719
- /// types](https://cloud.ibm.com/docs/services/ language-translator?topic=language-translator-document-translator-tutorial#supported-file-formats)
723
+ /// types](https://cloud.ibm.com/docs/language-translator?topic=language-translator-document-translator-tutorial#supported-file-formats)
720
724
///
721
725
/// Maximum file size: **20 MB**.</param>
722
726
/// <param name="filename">The filename for file.</param>
723
727
/// <param name="fileContentType">The content type of file. (optional)</param>
724
- /// <param name="modelId">The model to use for translation. `model_id` or both `source` and `target` are
725
- /// required. (optional)</param>
728
+ /// <param name="modelId">The model to use for translation. For example, `en-de` selects the IBM provided base
729
+ /// model for English to German translation. A model ID overrides the source and target parameters and is
730
+ /// required if you use a custom model. If no model ID is specified, you must specify a target language.
731
+ /// (optional)</param>
726
732
/// <param name="source">Language code that specifies the language of the source document. (optional)</param>
727
- /// <param name="target">Language code that specifies the target language for translation. (optional)</param>
733
+ /// <param name="target">Language code that specifies the target language for translation. Required if model ID
734
+ /// is not specified. (optional)</param>
728
735
/// <param name="documentId">To use a previously submitted document as the source for a new translation, enter
729
736
/// the `document_id` of the document. (optional)</param>
730
737
/// <returns><see cref="DocumentStatus" />DocumentStatus</returns>
@@ -1015,4 +1022,4 @@ private void OnGetTranslatedDocumentResponse(RESTConnector.Request req, RESTConn
1015
1022
( ( RequestObject < byte [ ] > ) req ) . Callback ( response , resp . Error ) ;
1016
1023
}
1017
1024
}
1018
- }
1025
+ }
0 commit comments