LocalizedMessage
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
หากส่วนหัว Accept-Language
ในคำขอขาเข้าไม่ใช่ "ภาษาอังกฤษ" แสดงว่าข้อผิดพลาดที่ Apps Script API แสดงผลจะมีข้อความนี้รวมอยู่ด้วย ซึ่งมีข้อความแสดงข้อผิดพลาดเดียวกับที่แปลเป็นภาษาที่ขอ
การแสดง JSON |
{
"locale": string,
"message": string
} |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eThe \u003ccode\u003eAccept-Language\u003c/code\u003e header in the request determines the language of error messages.\u003c/p\u003e\n"],["\u003cp\u003eError responses may contain a localized message object with the locale and translated message.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003elocale\u003c/code\u003e field follows the BCP 47 specification for language tags (e.g., "en-US").\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003emessage\u003c/code\u003e field provides the error message translated into the specified locale.\u003c/p\u003e\n"]]],[],null,["# LocalizedMessage\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nIf 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.\n\n| JSON representation |\n|-------------------------------------------------|\n| ``` { \"locale\": string, \"message\": string } ``` |\n\n| Fields ||\n|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `locale` | `string` The locale used following the specification defined at \u003chttps://www.rfc-editor.org/rfc/bcp/bcp47.txt\u003e. Examples are: \"en-US\", \"fr-CH\", \"es-MX\" |\n| `message` | `string` The localized error message in the above locale. |"]]