MLKitTranslate フレームワーク リファレンス
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
MLKTranslateRemoteModel
サーバーにリモートで保存され、デバイスにダウンロードされる翻訳モデル。
-
-
指定された言語で構成された TranslateRemoteModel
のインスタンスを取得します。このモデルを使用すると、ModelManager
から download(_:)
API を呼び出してダウンロードをトリガーできます。
TranslateRemoteModel
は内部で ModelManager
を使用します。TranslateRemoteModel
をダウンロードすると、RemoteModel
の通知が送信されます。このような通知が TranslateRemoteModel
に属しているかどうかを確認するには、ユーザー情報辞書の ModelDownloadUserInfoKeyRemoteModel
フィールドに TranslateRemoteModel
型のオブジェクトが含まれていることを確認します。TranslateLanguage.english
は組み込みであるため、TranslateLanguage.english
でインスタンス化しないでください。そうしないと、そのようなインスタンスはダウンロードまたは削除できません。
宣言
Objective-C
+ (nonnull MLKTranslateRemoteModel *)translateRemoteModelWithLanguage:
(nonnull MLKTranslateLanguage)language;
戻り値
TranslateRemoteModel
インスタンス。
-
使用できません。translateRemoteModel(language:)
を代わりに使用してください。
宣言
Objective-C
- (nonnull instancetype)init;
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-11-06 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-11-06 UTC。"],[[["`MLKTranslateRemoteModel` is a translation model stored on a server and downloaded to the device for use."],["It is associated with a specific language, accessible via the `language` property."],["Instances should be created using `translateRemoteModelWithLanguage:`, specifying the desired language."],["Downloading the model triggers a `RemoteModel` notification, verifiable through the `ModelDownloadUserInfoKeyRemoteModel` field."],["Direct initialization with `init` is not allowed; use the provided factory method instead."]]],["The `MLKTranslateRemoteModel` is a remotely stored translation model downloaded to a device. Each model is associated with a specific language, accessible via the `language` property. Instances are created using `translateRemoteModelWithLanguage:`, which takes a language parameter. This model leverages `ModelManager` for downloads, triggering notifications for `RemoteModel`. You can check if a notification is a `TranslateRemoteModel`. Initialization using `init` is unavailable. Built-in models such as `TranslateLanguage.english` are not downloadable.\n"]]