HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/394/lib/surface/ml/translate/batch_translate_text.yaml
- release_tracks: [ALPHA, BETA]

  help_text:
    brief:
      Translates a large volume of text in asynchronous batch mode.
    description: |
       Translates a large volume of text in asynchronous batch mode. This command
       provides real-time output as the inputs are being processed.
    examples: |
      The following command translates 'input.txt' file into French and Spanish:

        $ {command} --source=gs://input.txt=text/plain --zone=us-central1 --target-language-codes=fr-CA,es-ES --source-language=en-US --models=fr-CA=TRL321456,es-ES=general/base --destination=gs://output
  request:
    collection: translate.projects.locations
    method: batchTranslateText
    modify_request_hooks:
    - googlecloudsdk.command_lib.ml.translate.hooks:UpdateRequestBatchTranslateText
    BETA:
      api_version: v3
    ALPHA:
      api_version: v3beta1

  arguments:
    resource:
      help_text: project.
      spec: !REF googlecloudsdk.command_lib.ml.translate.resources:project
      override_resource_collection: true

    params:
    - _REF_: googlecloudsdk.command_lib.ml.translate.flags:zone
    - arg_name: source
      required: true
      metavar: FILE_PATH[=FILE_TYPE]
      type: 'googlecloudsdk.calliope.arg_parsers:ArgDict:allow_key_only=True'
      help_text: |
        Comma-separated list of entries of the form FILE_PATH[=FILE_TYPE]
        specifying source files and files types for the translation. FILE_PATH must
        be a Google Cloud Storage URI. FILE_TYPE defaults to 'text/html' if not
        present. Possible FILE_TYPES are 'text/html', 'text/plain'.

        Usage:

        '--source gs://input/input.txt=text/plain,gs://input/my.html=text/html'
    - arg_name: models
      metavar: KEY=VALUE
      type: 'googlecloudsdk.calliope.arg_parsers:ArgDict:'
      help_text: |
        Models to use for translation. Comma-separated dictionary where  map's key
        is target language code, map's value is model name. Value can be a built-in
        general model, or an AutoML Translation model.

        Usage:

        '--models es-ES=TRL321456789,en-US=general/nmt'
    - arg_name: glossaries
      metavar: KEY=VALUE
      type: 'googlecloudsdk.calliope.arg_parsers:ArgDict:'
      help_text: |
        Glossaries to be applied for translation. Comma-separated dictionary
        where  map's key is target language code, map's value is glossary name.
    - arg_name: destination
      required: true
      help_text: |
        Location to which the results should be written. Must be a Google Cloud
        Storage URI.
    - arg_name: target-language-codes
      type: 'googlecloudsdk.calliope.arg_parsers:ArgList:'
      required: true
      help_text: |
        The languages to which the text is to be translated. Specify up to 10
        language codes here.
    - arg_name: source-language
      required: true
      help_text: |
        Source language code of the text.