# generaltranslation: General Translation Core SDK: TranslateManyEntry URL: https://generaltranslation.com/en-US/docs/core/types/Entry.mdx --- title: TranslateManyEntry description: Type definition for translation entries used in translate and translateMany operations --- ## Overview `TranslateManyEntry` represents the input type for [`translate`](/docs/core/class/methods/translation/translate) and [`translateMany`](/docs/core/class/methods/translation/translate-many). It can be a plain string or an object with source content and optional metadata. ```typescript type TranslateManyEntry = string | { source: Content; metadata?: EntryMetadata }; ``` ## Variants ### String A plain string is the simplest form — it will be translated as-is: ```typescript 'Hello, world!' ``` ### Object An object with `source` and optional `metadata`: | Property | Type | Description | |----------|------|-------------| | `source` | `Content` | Source content to translate | | `metadata?` | `EntryMetadata` | Optional metadata for translation customization | ### Content type ```typescript type Content = JsxChildren | IcuMessage | StringMessage | I18nextMessage; ``` --- ## Examples ### Plain strings ```typescript copy import { GT } from 'generaltranslation'; const gt = new GT({ apiKey: 'your-api-key', projectId: 'your-project-id' }); // Single string const result = await gt.translate('Hello, world!', 'es'); // Array of strings const results = await gt.translateMany(['Home', 'About', 'Contact'], 'es'); ``` ### Objects with metadata ```typescript copy import { GT, TranslateManyEntry } from 'generaltranslation'; const gt = new GT({ apiKey: 'your-api-key', projectId: 'your-project-id' }); const entries: TranslateManyEntry[] = [ { source: 'Hello, world!' }, { source: '{count, plural, other {{count} items}}', metadata: { dataFormat: 'ICU', context: 'Item count display' } } ]; const results = await gt.translateMany(entries, { targetLocale: 'es' }); ``` ## Related types * [`EntryMetadata`](/docs/core/types/entry-metadata) - Metadata options * [`TranslateManyResult`](/docs/core/types/translate-many-result) - Batch translation results * [`Content`](/docs/core/types/Content) - Content type union