I18nLanguages
แหล่งข้อมูล i18nLanguage
จะระบุภาษาของแอปพลิเคชันที่เว็บไซต์ YouTube รองรับ ภาษาแอปพลิเคชันอาจเรียกว่าภาษา UI ก็ได้ สำหรับเว็บไซต์ YouTube ระบบอาจเลือกภาษาของแอปพลิเคชันโดยอัตโนมัติตามการตั้งค่าบัญชี Google, ภาษาเบราว์เซอร์ หรือตำแหน่ง IP นอกจากนี้ ผู้ใช้ยังเลือกภาษา UI ที่ต้องการด้วยตนเองได้จากส่วนท้ายเว็บไซต์ YouTube
ทรัพยากร i18nLanguage
แต่ละรายการจะระบุรหัสภาษาและชื่อ คุณสามารถใช้รหัสภาษาเป็นค่าของพารามิเตอร์ hl
เมื่อเรียกใช้เมธอด API เช่น videoCategories.list
และ guideCategories.list
เมธอด
API รองรับวิธีการต่อไปนี้สำหรับทรัพยากร i18nLanguages
- list
- แสดงรายการภาษาของแอปพลิเคชันที่เว็บไซต์ YouTube รองรับ
ลองใช้เลย
การนําเสนอทรัพยากร
โครงสร้าง JSON ต่อไปนี้แสดงรูปแบบของแหล่งข้อมูล i18nLanguages
{
"kind": "youtube#i18nLanguage",
"etag": etag,
"id": string,
"snippet": {
"hl": string,
"name": string
}
}
พร็อพเพอร์ตี้
ตารางต่อไปนี้จะกำหนดพร็อพเพอร์ตี้ที่ปรากฏในทรัพยากรนี้
พร็อพเพอร์ตี้ |
kind |
string
ระบุประเภทของทรัพยากร API ค่าจะเป็น youtube#i18nLanguage |
etag |
etag
Etag ของทรัพยากรนี้ |
id |
string
รหัสที่ YouTube ใช้เพื่อระบุภาษา i18n ที่ไม่ซ้ำกัน |
snippet |
object
ออบเจ็กต์ snippet มีรายละเอียดพื้นฐานเกี่ยวกับภาษา i18n เช่น รหัสและชื่อภาษา |
snippet.hl |
string
รหัส BCP-47 ที่ระบุภาษาที่ไม่ซ้ำกัน |
snippet.name |
string
ชื่อภาษาตามที่เขียนในภาษาที่ระบุโดยใช้พารามิเตอร์ hl ของเมธอด i18nLanguage.list |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-11-29 UTC
[null,null,["อัปเดตล่าสุด 2024-11-29 UTC"],[[["The i18nLanguage resource identifies a language supported by the YouTube website, which can be automatically set based on Google Account settings, browser language, or IP location, or manually selected by the user."],["Each i18nLanguage resource includes a language code and a name, with the language code being usable as the value for the `hl` parameter in API calls like `videoCategories.list` and `guideCategories.list`."],["The i18nLanguages resource can be retrieved using the `i18nLanguages.list` method, which provides a list of supported application languages."],["The resource is represented in JSON format, containing properties such as `kind` (identifying the resource type), `etag`, `id`, and a `snippet` object with details like the `hl` code and the language `name`."]]],["The `i18nLanguage` resource details supported application languages for YouTube, also known as UI languages. Each resource includes a language code (`hl`) and a name. The language can be automatically selected based on Google Account settings, browser language, or IP location, or manually chosen. The language code can be used in API methods. The `i18nLanguages.list` method returns a list of these languages, defined by their ID, and snippet data, which includes the `hl` code and name.\n"]]