我们正在更新 Data API,以便与 YouTube 统计 Shorts 短视频观看次数的方式保持一致。
了解详情
I18nRegions
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
i18nRegion
资源用于标识 YouTube 用户可以选择作为首选内容区域的地理区域。内容区域也可以称为内容语言区域。对于 YouTube 网站,系统可能会根据 YouTube 网域或用户的 IP 位置等启发词语自动选择内容区域。用户还可以从 YouTube 网站页脚手动选择所需的内容区域。
每个 i18nRegion
资源都标识一个区域代码和名称。调用 search.list
、videos.list
、activities.list
和 videoCategories.list
等 API 方法时,可将地区代码用作 regionCode
参数的值。
方法
该 API 支持对 i18nRegions
资源使用以下方法:
- list
- 返回 YouTube 网站支持的内容区域列表。
立即试用。
资源表示法
以下 JSON 结构显示了 i18nRegions
资源的格式:
{
"kind": "youtube#i18nRegion",
"etag": etag,
"id": string,
"snippet": {
"gl": string,
"name": string
}
}
属性
下表定义了此资源中显示的属性:
属性 |
kind |
string
用于标识 API 资源的类型。该值将为 youtube#i18nRegion 。 |
etag |
etag
此资源的 ETag。 |
id |
string
YouTube 用于唯一标识国际化区域的 ID。 |
snippet |
object
snippet 对象包含有关 i18n 区域的基本详细信息,例如其区域代码和名称。 |
snippet.gl |
string
用于标识地区的由两个字母组成的 ISO 国家/地区代码。 |
snippet.name |
string
区域名称。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-21。
[null,null,["最后更新时间 (UTC):2025-08-21。"],[[["\u003cp\u003eAn i18nRegion resource specifies a geographic area that YouTube users can choose as their preferred content region.\u003c/p\u003e\n"],["\u003cp\u003eThe i18nRegion includes a region code and a name, and the code can be used when calling API methods such as \u003ccode\u003esearch.list\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe YouTube API's \u003ccode\u003ei18nRegions.list\u003c/code\u003e method allows retrieval of a list of supported content regions.\u003c/p\u003e\n"],["\u003cp\u003eEach i18nRegion resource includes an \u003ccode\u003eid\u003c/code\u003e, \u003ccode\u003eetag\u003c/code\u003e, and \u003ccode\u003esnippet\u003c/code\u003e containing the region code (\u003ccode\u003egl\u003c/code\u003e) and region \u003ccode\u003ename\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `i18nRegion` resource represents a YouTube content region, selectable by users or automatically determined. Each resource has a unique ID, region code, and name. The region code is usable in API methods like `search.list`. The resource can be retrieved via the `i18nRegions.list` method, which provides the supported content regions. The resource's properties include `kind` (`youtube#i18nRegion`), `etag`, `id`, and a `snippet` object containing the region's code (`gl`) and name.\n"],null,["# I18nRegions\n\nAn **i18nRegion** resource identifies a geographic area that a YouTube user can select as the preferred content region. The content region can also be referred to as a content locale. For the YouTube website, a content region could be automatically selected based on heuristics like the YouTube domain or the user's IP location. A user could also manually select the desired content region from the YouTube site footer. \n\nEach `i18nRegion` resource identifies a region code and a name. The region code can be used as the value of the `regionCode` parameter when calling API methods like `search.list`, `videos.list`, `activities.list`, and `videoCategories.list`.\n\nMethods\n-------\n\nThe API supports the following methods for `i18nRegions` resources:\n\n[list](/youtube/v3/docs/i18nRegions/list)\n: Returns a list of content regions that the YouTube website supports.\n [Try it now](/youtube/v3/docs/i18nRegions/list#usage).\n\nResource representation\n-----------------------\n\nThe following JSON structure shows the format of a `i18nRegions` resource: \n\n```text\n{\n \"kind\": \"youtube#i18nRegion\",\n \"etag\": etag,\n \"id\": string,\n \"snippet\": {\n \"gl\": string,\n \"name\": string\n }\n}\n```\n\n### Properties\n\nThe following table defines the properties that appear in this resource:\n\n| Properties ||\n|----------------|---------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Identifies the API resource's type. The value will be `youtube#i18nRegion`. |\n| `etag` | `etag` The Etag of this resource. |\n| `id` | `string` The ID that YouTube uses to uniquely identify the i18n region. |\n| `snippet` | `object` The `snippet` object contains basic details about the i18n region, such as its region code and name. |\n| snippet.`gl` | `string` The two-letter ISO country code that identifies the region. |\n| snippet.`name` | `string` The name of the region. |"]]