# 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
This type is deprecated. The current API uses `FileToUpload` for uploading files (via [`uploadSourceFiles`](/docs/core/class/methods/translation/upload-source-files)) and `FileReferenceIds` for enqueueing translations (via [`enqueueFiles`](/docs/core/class/methods/translation/enqueue-files)).
`FileToTranslate` was previously used to represent a file object for batch translation operations.
```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' | 'PO' | 'POT' | '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