# General Translation Platform: TranslateManyEntry URL: https://generaltranslation.com/en-GB/docs/platform/core/reference/types/translate-many-entry.mdx --- title: TranslateManyEntry description: Input shape for translate and translateMany entries. API reference for TranslateManyEntry type. --- `TranslateManyEntry` is the input type accepted by [`translate`](/docs/platform/core/reference/gt-class-methods/translation/translate) and [`translateMany`](/docs/platform/core/reference/gt-class-methods/translation/translate-many). It can be a plain string or an object with source content and optional metadata. ## Overview [#overview] `TranslateManyEntry` is a union: pass a bare string to translate it as-is, or an object with a `source` and optional `metadata` for finer control. ```typescript type TranslateManyEntry = string | { source: Content; metadata?: EntryMetadata }; ``` ## Members [#members] | Member | Description | Type | | ----------------- | -------------------------------------- | -------- | | [String](#string) | Plain string, translated as is. | `string` | | [Object](#object) | Source content with optional metadata. | `object` | ### String [#string] **Type** `string` The simplest form. A plain string is translated directly: ```typescript 'Hello, world!' ``` ### Object [#object] **Type** `object` An object with a `source` and optional `metadata`: | Property | Description | Type | Optional | | ---------- | --------------------------------------- | --------------------------------------------------------------------- | -------- | | `source` | Source content to translate. | [`Content`](/docs/platform/core/reference/types/content) | No | | `metadata` | Metadata for translation customisation. | [`EntryMetadata`](/docs/platform/core/reference/types/entry-metadata) | Yes | The `source` accepts any [`Content`](/docs/platform/core/reference/types/content) value: ```typescript type Content = JsxChildren | IcuMessage | StringMessage | I18nextMessage; ``` ## Example [#example] ```typescript 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'); ``` ```typescript import { GT } from 'generaltranslation'; import { TranslateManyEntry } from 'generaltranslation/types'; 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' }); ```