Google Cloud Storage destination for output content. For every single input document (for example, gs://a/b/c.[extension]), we generate at most 2 * n output files. (n is the # of target_language_codes in the BatchTranslateDocumentRequest). While the input documents are being processed, we write/update an index file index.csv under gcs_destination.output_uri_prefix (for example, gs://translation_output/index.csv) The index file is generated/updated as new files are being translated. The format is: input_document,target_language_code,translation_output,error_output, glossary_translation_output,glossary_error_output input_document is one file we matched using gcs_source.input_uri. target_language_code is provided in the request. translation_output contains the translations. (details provided below) error_output contains the error message during processing of the file. Both translations_file and errors_file could be empty strings if we have no content to output. glossary_translation_output and glossary_error_output are the translated output/error when we apply glossaries. They could also be empty if we have no content to output. Once a row is present in index.csv, the input/output matching never changes. Callers should also expect all the content in input_file are processed and ready to be consumed (that is, no partial output file is written). Since index.csv will be keeping updated during the process, please make sure there is no custom retention policy applied on the output bucket that may avoid file updating. (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The naming format of translation output files follows (for target language code [trg]): translation_output: gs://translation_output/a_b_c_[trg]_translation.[extension]glossary_translation_output: gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]. The output document will maintain the same file format as the input document. The naming format of error output files follows (for target language code [trg]): error_output: gs://translation_test/a_b_c_[trg]_errors.txtglossary_error_output: gs://translation_test/a_b_c_[trg]_glossary_translation.txt. The error output is a txt file containing error details.
getGcsDestination
Google Cloud Storage destination for output content.
For every single input document (for example, gs://a/b/c.[extension]), we
generate at most 2 * n output files. (n is the # of target_language_codes
in the BatchTranslateDocumentRequest).
While the input documents are being processed, we write/update an index
file index.csv under gcs_destination.output_uri_prefix (for example,
gs://translation_output/index.csv) The index file is generated/updated as
new files are being translated. The format is:
input_document,target_language_code,translation_output,error_output,
glossary_translation_output,glossary_error_output
input_document is one file we matched using gcs_source.input_uri.
target_language_code is provided in the request.
translation_output contains the translations. (details provided below)
error_output contains the error message during processing of the file.
Both translations_file and errors_file could be empty strings if we have
no content to output.
glossary_translation_output and glossary_error_output are the
translated output/error when we apply glossaries. They could also be
empty if we have no content to output.
Once a row is present in index.csv, the input/output matching never
changes. Callers should also expect all the content in input_file are
processed and ready to be consumed (that is, no partial output file is
written).
Since index.csv will be keeping updated during the process, please make
sure there is no custom retention policy applied on the output bucket
that may avoid file updating.
(https://cloud.google.com/storage/docs/bucket-lock#retention-policy)
The naming format of translation output files follows (for target
language code [trg]): translation_output:
gs://translation_output/a_b_c_[trg]_translation.[extension]glossary_translation_output:
gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]. The
output document will maintain the same file format as the input document.
The naming format of error output files follows (for target language code
[trg]): error_output: gs://translation_test/a_b_c_[trg]_errors.txtglossary_error_output:
gs://translation_test/a_b_c_[trg]_glossary_translation.txt. The error
output is a txt file containing error details.
Google Cloud Storage destination for output content.
For every single input document (for example, gs://a/b/c.[extension]), we
generate at most 2 * n output files. (n is the # of target_language_codes
in the BatchTranslateDocumentRequest).
While the input documents are being processed, we write/update an index
file index.csv under gcs_destination.output_uri_prefix (for example,
gs://translation_output/index.csv) The index file is generated/updated as
new files are being translated. The format is:
input_document,target_language_code,translation_output,error_output,
glossary_translation_output,glossary_error_output
input_document is one file we matched using gcs_source.input_uri.
target_language_code is provided in the request.
translation_output contains the translations. (details provided below)
error_output contains the error message during processing of the file.
Both translations_file and errors_file could be empty strings if we have
no content to output.
glossary_translation_output and glossary_error_output are the
translated output/error when we apply glossaries. They could also be
empty if we have no content to output.
Once a row is present in index.csv, the input/output matching never
changes. Callers should also expect all the content in input_file are
processed and ready to be consumed (that is, no partial output file is
written).
Since index.csv will be keeping updated during the process, please make
sure there is no custom retention policy applied on the output bucket
that may avoid file updating.
(https://cloud.google.com/storage/docs/bucket-lock#retention-policy)
The naming format of translation output files follows (for target
language code [trg]): translation_output:
gs://translation_output/a_b_c_[trg]_translation.[extension]glossary_translation_output:
gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]. The
output document will maintain the same file format as the input document.
The naming format of error output files follows (for target language code
[trg]): error_output: gs://translation_test/a_b_c_[trg]_errors.txtglossary_error_output:
gs://translation_test/a_b_c_[trg]_glossary_translation.txt. The error
output is a txt file containing error details.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Translation V3 Client - Class BatchDocumentOutputConfig (2.0.3)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.3 (latest)](/php/docs/reference/cloud-translate/latest/V3.BatchDocumentOutputConfig)\n- [2.0.2](/php/docs/reference/cloud-translate/2.0.2/V3.BatchDocumentOutputConfig)\n- [1.21.0](/php/docs/reference/cloud-translate/1.21.0/V3.BatchDocumentOutputConfig)\n- [1.20.2](/php/docs/reference/cloud-translate/1.20.2/V3.BatchDocumentOutputConfig)\n- [1.19.0](/php/docs/reference/cloud-translate/1.19.0/V3.BatchDocumentOutputConfig)\n- [1.18.1](/php/docs/reference/cloud-translate/1.18.1/V3.BatchDocumentOutputConfig)\n- [1.17.7](/php/docs/reference/cloud-translate/1.17.7/V3.BatchDocumentOutputConfig)\n- [1.16.0](/php/docs/reference/cloud-translate/1.16.0/V3.BatchDocumentOutputConfig)\n- [1.15.4](/php/docs/reference/cloud-translate/1.15.4/V3.BatchDocumentOutputConfig)\n- [1.14.3](/php/docs/reference/cloud-translate/1.14.3/V3.BatchDocumentOutputConfig)\n- [1.13.3](/php/docs/reference/cloud-translate/1.13.3/V3.BatchDocumentOutputConfig)\n- [1.12.12](/php/docs/reference/cloud-translate/1.12.12/V3.BatchDocumentOutputConfig) \nReference documentation and code samples for the Cloud Translation V3 Client class BatchDocumentOutputConfig.\n\nOutput configuration for BatchTranslateDocument request.\n\nGenerated from protobuf message `google.cloud.translation.v3.BatchDocumentOutputConfig`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Translate \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getGcsDestination\n\nGoogle Cloud Storage destination for output content.\n\nFor every single input document (for example, gs://a/b/c.\\[extension\\]), we\ngenerate at most 2 \\* n output files. (n is the # of target_language_codes\nin the BatchTranslateDocumentRequest).\nWhile the input documents are being processed, we write/update an index\nfile `index.csv` under `gcs_destination.output_uri_prefix` (for example,\ngs://translation_output/index.csv) The index file is generated/updated as\nnew files are being translated. The format is:\ninput_document,target_language_code,translation_output,error_output,\nglossary_translation_output,glossary_error_output\n`input_document` is one file we matched using gcs_source.input_uri.\n`target_language_code` is provided in the request.\n`translation_output` contains the translations. (details provided below)\n`error_output` contains the error message during processing of the file.\nBoth translations_file and errors_file could be empty strings if we have\nno content to output.\n`glossary_translation_output` and `glossary_error_output` are the\ntranslated output/error when we apply glossaries. They could also be\nempty if we have no content to output.\nOnce a row is present in index.csv, the input/output matching never\nchanges. Callers should also expect all the content in input_file are\nprocessed and ready to be consumed (that is, no partial output file is\nwritten).\nSince index.csv will be keeping updated during the process, please make\nsure there is no custom retention policy applied on the output bucket\nthat may avoid file updating.\n(\u003chttps://cloud.google.com/storage/docs/bucket-lock#retention-policy\u003e)\nThe naming format of translation output files follows (for target\nlanguage code \\[trg\\]): `translation_output`:\n`gs://translation_output/a_b_c_[trg]_translation.[extension]`\n`glossary_translation_output`:\n`gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. The\noutput document will maintain the same file format as the input document.\nThe naming format of error output files follows (for target language code\n\\[trg\\]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt`\n`glossary_error_output`:\n`gs://translation_test/a_b_c_[trg]_glossary_translation.txt`. The error\noutput is a txt file containing error details.\n\n### hasGcsDestination\n\n### setGcsDestination\n\nGoogle Cloud Storage destination for output content.\n\nFor every single input document (for example, gs://a/b/c.\\[extension\\]), we\ngenerate at most 2 \\* n output files. (n is the # of target_language_codes\nin the BatchTranslateDocumentRequest).\nWhile the input documents are being processed, we write/update an index\nfile `index.csv` under `gcs_destination.output_uri_prefix` (for example,\ngs://translation_output/index.csv) The index file is generated/updated as\nnew files are being translated. The format is:\ninput_document,target_language_code,translation_output,error_output,\nglossary_translation_output,glossary_error_output\n`input_document` is one file we matched using gcs_source.input_uri.\n`target_language_code` is provided in the request.\n`translation_output` contains the translations. (details provided below)\n`error_output` contains the error message during processing of the file.\nBoth translations_file and errors_file could be empty strings if we have\nno content to output.\n`glossary_translation_output` and `glossary_error_output` are the\ntranslated output/error when we apply glossaries. They could also be\nempty if we have no content to output.\nOnce a row is present in index.csv, the input/output matching never\nchanges. Callers should also expect all the content in input_file are\nprocessed and ready to be consumed (that is, no partial output file is\nwritten).\nSince index.csv will be keeping updated during the process, please make\nsure there is no custom retention policy applied on the output bucket\nthat may avoid file updating.\n(\u003chttps://cloud.google.com/storage/docs/bucket-lock#retention-policy\u003e)\nThe naming format of translation output files follows (for target\nlanguage code \\[trg\\]): `translation_output`:\n`gs://translation_output/a_b_c_[trg]_translation.[extension]`\n`glossary_translation_output`:\n`gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. The\noutput document will maintain the same file format as the input document.\nThe naming format of error output files follows (for target language code\n\\[trg\\]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt`\n`glossary_error_output`:\n`gs://translation_test/a_b_c_[trg]_glossary_translation.txt`. The error\noutput is a txt file containing error details.\n\n### getDestination"]]