# General Translation Platform: EnqueueFilesOptions URL: https://generaltranslation.com/ja/docs/platform/core/reference/types/enqueue-files-options.mdx --- title: EnqueueFilesOptions description: General Translation で、アップロード済みのファイルを翻訳用キューに登録するためのオプション。EnqueueFilesOptions 型の API リファレンス。 --- `EnqueueFilesOptions` は、事前にアップロードしたソースファイルを翻訳用キューに登録するために [`enqueueFiles`](/docs/platform/core/reference/gt-class-methods/translation/enqueue-files) に渡す設定型です。 *注: これは 9.0 において [`enqueueFiles`](/docs/platform/core/reference/gt-class-methods/translation/enqueue-files) が受け付けるユーザー向けの型です。* ## 概要 [#overview] `EnqueueFilesOptions` は、ファイルの一括翻訳における対象ロケールとジョブ設定を定義します。必須なのは `targetLocales` のみで、その他のフィールドはすべて任意です。 ```typescript type EnqueueFilesOptions = { sourceLocale?: string; targetLocales: string[]; modelProvider?: string; force?: boolean; timeout?: number; }; ``` ## プロパティ [#properties] | プロパティ | 説明 | Type | 任意 | | ---------------------------------- | -------------------------- | ---------- | --- | | [`sourceLocale`](#source-locale) | ソースロケールを上書きします。 | `string` | はい | | [`targetLocales`](#target-locales) | 翻訳先のロケールコード。 | `string[]` | いいえ | | [`modelProvider`](#model-provider) | 翻訳モデルのプロバイダー。 | `string` | はい | | [`force`](#force) | キャッシュされた翻訳を無効にし、再翻訳を強制します。 | `boolean` | はい | | [`timeout`](#timeout) | リクエストタイムアウト (ミリ秒) 。 | `number` | はい | *注: `requireApproval` は 8.x 専用のオプションで、9.0 には存在しません。* ### `sourceLocale` [#source-locale] **型** `string` · **任意** このジョブのソースロケールを上書きします。省略した場合は、インスタンスの `sourceLocale` がデフォルトで使用されます。 ### `targetLocales` [#target-locales] **型** `string[]` · **必須** ファイルの翻訳先のロケールコードです。 ### `modelProvider` [#model-provider] **型** `string` · **任意** 使用する翻訳モデルのプロバイダー。 ### `force` [#force] **型** `boolean` · **任意** キャッシュ済みの翻訳を無効にし、すでに翻訳が存在する場合でもファイルを強制的に再翻訳します。 ### `timeout` [#timeout] **Type** `number` · **任意** リクエストタイムアウト時間 (ミリ秒) 。 ## 例 [#example] ```typescript import { GT, EnqueueFilesOptions } from 'generaltranslation'; const options: EnqueueFilesOptions = { targetLocales: ['es', 'fr', 'de'], sourceLocale: 'en', modelProvider: 'premium', }; const result = await gt.enqueueFiles(files, options); ``` ```typescript // 開発環境 vs 本番環境 const devOptions: EnqueueFilesOptions = { targetLocales: ['es'], }; const prodOptions: EnqueueFilesOptions = { targetLocales: ['es', 'fr', 'de', 'ja'], modelProvider: 'premium', force: true, }; ```