# generaltranslation: General Translation Core SDK: TranslateManyResult URL: https://generaltranslation.com/ru/docs/core/types/translate-many-result.mdx --- title: TranslateManyResult description: Определение типа для результатов, возвращаемых операциями пакетного перевода --- ## Обзор `TranslateManyResult` представляет результат операций пакетного перевода, выполняемых с помощью [`translateMany`](/docs/core/class/methods/translation/translate-many). ```typescript type TranslateManyResult = TranslationResult[]; ``` Это массив объектов [`TranslationResult`](/docs/core/types/translation-result), сохраняющий тот же порядок, что и входные записи. ## Структура ```typescript type TranslationResult = RequestSuccess | TranslationError; type RequestSuccess = TypedResult & { success: true; locale: string; }; type TranslationError = { success: false; error: string; code: number; }; ``` Каждый элемент — либо успешный результат, либо ошибка; это различается по свойству `success`. ## Примеры ### Основы использования ```typescript copy import { GT, TranslateManyResult } from 'generaltranslation'; const gt = new GT({ apiKey: 'your-api-key', projectId: 'your-project-id' }); const results: TranslateManyResult = await gt.translateMany( ['Hello', 'Goodbye'], 'es' ); ``` ### Обработка ошибок ```typescript copy results.forEach((result, index) => { if (result.success) { console.log(`Entry ${index}: ${result.translation}`); } else { console.error(`Entry ${index} failed: ${result.error}`); } }); ``` ## Связанные типы * [`TranslationResult`](/docs/core/types/translation-result) - Структура отдельного результата * [`translateMany`](/docs/core/class/methods/translation/translate-many) - Метод, возвращающий этот тип