MLKitTranslate Çerçevesi Referansı
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
MLKTranslatorOptions
@interface MLKTranslatorOptions : NSObject
Translator
için seçenekler.
-
-
Girişin çevrileceği hedef dildir.
-
Belirtilen kaynak ve hedef dillerle çevirmen seçeneklerinin yeni bir örneğini oluşturur.
Parametreler
sourceLanguage
|
Çevirmen için kaynak dil.
|
targetLanguage
|
|
Döndürülen Değer
Belirtilen kaynak ve hedef dile sahip yeni bir TranslatorOptions
örneği.
-
Cihazlar kullanılamıyor. Bunun yerine init(sourceLanguage:targetLanguage:)
politikasını kullanın.
Bildirim
Objective-C
- (nonnull instancetype)init;
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-25 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-25 UTC."],[[["\u003cp\u003e\u003ccode\u003eMLKTranslatorOptions\u003c/code\u003e configures the source and target languages for translation using \u003ccode\u003eMLKTranslator\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt requires specifying both source and target languages during initialization using \u003ccode\u003einitWithSourceLanguage:targetLanguage:\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDirect initialization using \u003ccode\u003einit\u003c/code\u003e is unavailable; always use the designated initializer.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esourceLanguage\u003c/code\u003e and \u003ccode\u003etargetLanguage\u003c/code\u003e properties provide read-only access to the configured language settings.\u003c/p\u003e\n"]]],[],null,["# MLKitTranslate Framework Reference\n\nMLKTranslatorOptions\n====================\n\n\n @interface MLKTranslatorOptions : NSObject\n\nOptions for `Translator`.\n- `\n ``\n ``\n `\n\n ### [sourceLanguage](#/c:objc(cs)MLKTranslatorOptions(py)sourceLanguage)\n\n `\n ` \n The source language of the input. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) ../Type-Definitions.html#/c:MLKTranslateLanguage.h@T@MLKTranslateLanguage _Nonnull sourceLanguage;\n\n- `\n ``\n ``\n `\n\n ### [targetLanguage](#/c:objc(cs)MLKTranslatorOptions(py)targetLanguage)\n\n `\n ` \n The target language to translate the input into. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) ../Type-Definitions.html#/c:MLKTranslateLanguage.h@T@MLKTranslateLanguage _Nonnull targetLanguage;\n\n- `\n ``\n ``\n `\n\n ### [-initWithSourceLanguage:targetLanguage:](#/c:objc(cs)MLKTranslatorOptions(im)initWithSourceLanguage:targetLanguage:)\n\n `\n ` \n Creates a new instance of translator options with the given source and target languages. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)\n initWithSourceLanguage:(nonnull ../Type-Definitions.html#/c:MLKTranslateLanguage.h@T@MLKTranslateLanguage)sourceLanguage\n targetLanguage:(nonnull ../Type-Definitions.html#/c:MLKTranslateLanguage.h@T@MLKTranslateLanguage)targetLanguage;\n\n #### Parameters\n\n |------------------------|-----------------------------------------|\n | ` `*sourceLanguage*` ` | The source language for the translator. |\n | ` `*targetLanguage*` ` | The target language for the translator. |\n\n #### Return Value\n\n A new instance of `TranslatorOptions` with the given source and target language.\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)MLKTranslatorOptions(im)init)\n\n `\n ` \n Unavailable. Use `init(sourceLanguage:targetLanguage:)` instead. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init;"]]