Skip to content

/AWS1/CL_XL8XLATIONSETTINGS

Settings to configure your translation output. You can configure the following options:

  • Brevity: reduces the length of the translation output for most translations. Available for TranslateText only.

  • Formality: sets the formality level of the translation output.

  • Profanity: masks profane words and phrases in the translation output.

CONSTRUCTOR

IMPORTING

Optional arguments:

IV_FORMALITY TYPE /AWS1/XL8FORMALITY /AWS1/XL8FORMALITY

You can specify the desired level of formality for translations to supported target languages. The formality setting controls the level of formal language usage (also known as register) in the translation output. You can set the value to informal or formal. If you don't specify a value for formality, or if the target language doesn't support formality, the translation will ignore the formality setting.

If you specify multiple target languages for the job, translate ignores the formality setting for any unsupported target language.

For a list of target languages that support formality, see Supported languages in the Amazon Translate Developer Guide.

IV_PROFANITY TYPE /AWS1/XL8PROFANITY /AWS1/XL8PROFANITY

You can enable the profanity setting if you want to mask profane words and phrases in your translation output.

To mask profane words and phrases, Amazon Translate replaces them with the grawlix string “?$#@$“. This 5-character sequence is used for each profane word or phrase, regardless of the length or number of words.

Amazon Translate doesn't detect profanity in all of its supported languages. For languages that don't support profanity detection, see Unsupported languages in the Amazon Translate Developer Guide.

If you specify multiple target languages for the job, all the target languages must support profanity masking. If any of the target languages don't support profanity masking, the translation job won't mask profanity for any target language.

IV_BREVITY TYPE /AWS1/XL8BREVITY /AWS1/XL8BREVITY

When you turn on brevity, Amazon Translate reduces the length of the translation output for most translations (when compared with the same translation with brevity turned off). By default, brevity is turned off.

If you turn on brevity for a translation request with an unsupported language pair, the translation proceeds with the brevity setting turned off.

For the language pairs that brevity supports, see Using brevity in the Amazon Translate Developer Guide.


Queryable Attributes

Formality

You can specify the desired level of formality for translations to supported target languages. The formality setting controls the level of formal language usage (also known as register) in the translation output. You can set the value to informal or formal. If you don't specify a value for formality, or if the target language doesn't support formality, the translation will ignore the formality setting.

If you specify multiple target languages for the job, translate ignores the formality setting for any unsupported target language.

For a list of target languages that support formality, see Supported languages in the Amazon Translate Developer Guide.

Accessible with the following methods

Method Description
GET_FORMALITY() Getter for FORMALITY, with configurable default
ASK_FORMALITY() Getter for FORMALITY w/ exceptions if field has no value
HAS_FORMALITY() Determine if FORMALITY has a value

Profanity

You can enable the profanity setting if you want to mask profane words and phrases in your translation output.

To mask profane words and phrases, Amazon Translate replaces them with the grawlix string “?$#@$“. This 5-character sequence is used for each profane word or phrase, regardless of the length or number of words.

Amazon Translate doesn't detect profanity in all of its supported languages. For languages that don't support profanity detection, see Unsupported languages in the Amazon Translate Developer Guide.

If you specify multiple target languages for the job, all the target languages must support profanity masking. If any of the target languages don't support profanity masking, the translation job won't mask profanity for any target language.

Accessible with the following methods

Method Description
GET_PROFANITY() Getter for PROFANITY, with configurable default
ASK_PROFANITY() Getter for PROFANITY w/ exceptions if field has no value
HAS_PROFANITY() Determine if PROFANITY has a value

Brevity

When you turn on brevity, Amazon Translate reduces the length of the translation output for most translations (when compared with the same translation with brevity turned off). By default, brevity is turned off.

If you turn on brevity for a translation request with an unsupported language pair, the translation proceeds with the brevity setting turned off.

For the language pairs that brevity supports, see Using brevity in the Amazon Translate Developer Guide.

Accessible with the following methods

Method Description
GET_BREVITY() Getter for BREVITY, with configurable default
ASK_BREVITY() Getter for BREVITY w/ exceptions if field has no value
HAS_BREVITY() Determine if BREVITY has a value