# Function buildTranslationConfig

- buildTranslationConfig<T extends ConfigType>(
  type: T,
  config: TranslationConfigParams<T>,
  ): TranslationReturnType<T>

  Convenience function to build a document translation configuration for orchestration service.

  #### Type Parameters

  - T extends ConfigType

  #### Parameters

  - type: T

    Type of the translation configuration, either `input` or `output`.

  - config: TranslationConfigParams<T>

    Config for SAP Document Translation service. The target language is mandatory, while source language will be auto-detected if not provided. See https://help.sap.com/docs/translation-hub/sap-translation-hub/supported-languages-6854bbb1bd824ffebc3a097a7c0fd45d for list of supported languages.

  #### Returns TranslationReturnType<T>

  SAP Document Translation configuration.

  #### Example

      buildTranslationConfig('input', { sourceLanguage: 'de-DE', targetLanguage: 'en-US' })

  #### Example

      buildTranslationConfig('input', { sourceLanguage: 'de-DE', targetLanguage: 'en-US', translateMessagesHistory: false })

  #### Example

      buildTranslationConfig('output', { targetLanguage: { category: 'placeholders', items: ['assistant_response'] } })

  Copyright Ⓒ 2026 SAP SE or an SAP affiliate company. All rights reserved.

  - Defined in packages/orchestration/dist/util/translation.d.ts:13