ما در حال بهروزرسانی Data API هستیم تا با نحوه شمارش بازدیدهای YouTube برای Shorts مطابقت داشته باشد.
بیشتر بدانید
I18nRegions
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
یک منبع i18nRegion
یک منطقه جغرافیایی را مشخص می کند که کاربر YouTube می تواند به عنوان منطقه محتوای ترجیحی انتخاب کند. منطقه محتوا را میتوان به عنوان محلی محتوا نیز نامید. برای وب سایت YouTube، یک منطقه محتوا می تواند به طور خودکار بر اساس اکتشافاتی مانند دامنه YouTube یا مکان IP کاربر انتخاب شود. کاربر همچنین می تواند به صورت دستی منطقه محتوای مورد نظر را از پاورقی سایت YouTube انتخاب کند.
هر منبع i18nRegion
یک کد منطقه و یک نام را مشخص می کند. هنگام فراخوانی متدهای API مانند search.list
، videos.list
، activities.list
و videoCategories.list
می توان از کد منطقه به عنوان مقدار پارامتر 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 برای شناسایی منحصر به فرد منطقه i18n استفاده می کند. |
snippet | object شی snippet حاوی جزئیات اساسی در مورد منطقه i18n است، مانند کد منطقه و نام آن. |
snippet. gl | string کد کشور ISO دو حرفی که منطقه را مشخص می کند. |
snippet. name | string نام منطقه. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-21 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 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. |"]]