# generaltranslation: General Translation Core SDK: DataFormat URL: https://generaltranslation.com/en-US/docs/core/types/data-format.mdx --- title: DataFormat description: Enumeration of supported content format types for translation --- ## Overview `DataFormat` specifies the format of translatable content. ```typescript type DataFormat = 'JSX' | 'ICU' | 'I18NEXT' | 'STRING'; ``` ## Type definition ### Values | Value | Description | Content Type | Use Case | |-------|-------------|--------------|----------| | `'JSX'` | JSX/React component format | `JsxChildren` | Rich UI components with elements and variables | | `'ICU'` | ICU MessageFormat | `IcuMessage` (string) | Complex formatting with plurals, dates, numbers | | `'I18NEXT'` | i18next message format | `I18nextMessage` (string) | Simple interpolation, existing i18next projects | | `'STRING'` | Plain string format | `string` | Simple text content | ### Format characteristics | Format | Variables | Pluralization | HTML Elements | Date/Number Formatting | |--------|-----------|---------------|---------------|----------------------| | **JSX** | ✅ Rich variables | ✅ Via branching | ✅ Full HTML support | ✅ Via variables | | **ICU** | ✅ `{variable}` syntax | ✅ Built-in plurals | ❌ Text only | ✅ Built-in formatters | | **I18NEXT** | ✅ `{{variable}}` syntax | ✅ Via count | ❌ Text only | ✅ Via formatters | | **STRING** | ❌ | ❌ | ❌ | ❌ | --- ## Examples ### Format specification ```typescript copy const icuEntry: TranslateManyEntry = { source: 'Hello {name}', metadata: { dataFormat: 'ICU' } }; const plainEntry: TranslateManyEntry = { source: 'Hello, world!', metadata: { dataFormat: 'STRING' } }; ``` --- ## Notes * DataFormat determines how content is processed by the translation system * Format specification in metadata ensures proper content processing * Auto-detection is possible but explicit specification is recommended ## Related types * [`Content`](/docs/core/types/Content) - Union of all content format types * [`JsxChildren`](/docs/core/types/jsx-children) - JSX format content