# generaltranslation: General Translation Core SDK: FileToTranslate URL: https://generaltranslation.com/en-US/docs/core/types/file-to-translate.mdx --- title: FileToTranslate description: Type definition for file objects used in batch file translation operations --- ## Overview `FileToTranslate` represents a file object for batch translation operations with [`enqueueFiles`](/docs/core/class/methods/translation/enqueue-files). ```typescript type FileToTranslate = { content: string; fileName: string; fileFormat: FileFormat; formatMetadata?: Record; dataFormat?: DataFormat; }; ``` ## Properties | Property | Type | Required | Description | |----------|------|----------|-------------| | `content` | `string` | **Yes** | Raw file content | | `fileName` | `string` | **Yes** | File identifier | | `fileFormat` | `FileFormat` | **Yes** | File format | | `formatMetadata?` | `Record` | No | Format-specific metadata | | `dataFormat?` | `DataFormat` | No | Data format within file | ### Related types ```typescript type FileFormat = 'JSON' | 'MDX' | 'MD' | 'HTML' | 'TXT' | string; type DataFormat = 'JSX' | 'ICU' | 'I18NEXT'; ``` ## Examples ### JSON file ```typescript copy import { FileToTranslate } from 'generaltranslation'; const jsonFile: FileToTranslate = { content: JSON.stringify({ "welcome": "Welcome", "save": "Save" }), fileName: 'common.json', fileFormat: 'JSON', dataFormat: 'I18NEXT' }; ``` ### MDX file ```typescript copy const mdxFile: FileToTranslate = { content: `# Getting Started\n\nWelcome to our platform!`, fileName: 'docs/start.mdx', fileFormat: 'MDX', dataFormat: 'JSX' }; ``` ## Related types * [`EnqueueFilesOptions`](/docs/core/types/enqueue-files-options) - Batch processing options