LocalizedMessage

  • Apps Script API errors include a LocalizedMessage with translated error text if the Accept-Language header is not "English".

  • The LocalizedMessage is represented in JSON with fields for the locale and the translated message.

  • The locale field uses the specification defined in BCP 47.

If the Accept-Language header in the incoming request is not "English", then errors returned by the Apps Script API include this message. It contains the same error text translated to the requested locale.

JSON representation
{
 "locale": string,
 "message": string
}
Fields
locale

string

The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"

message

string

The localized error message in the above locale.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024年10月31日 UTC.