Aktualizujemy interfejs Data API, aby był zgodny ze sposobem zliczania przez YouTube wyświetleń filmów Short.
Więcej informacji
I18nLanguages
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Zasób i18nLanguage
identyfikuje język aplikacji obsługiwany przez witrynę YouTube. Język aplikacji można też określić jako język interfejsu. W przypadku strony YouTube język aplikacji może być wybierany automatycznie na podstawie ustawień konta Google, języka przeglądarki lub lokalizacji adresu IP. Użytkownik może też ręcznie wybrać odpowiedni język interfejsu w stopce strony YouTube.
Każdy zasób i18nLanguage
zawiera kod języka i jego nazwę. Kodu języka można używać jako wartości parametru hl
przy wywoływaniu metod interfejsu API, takich jak videoCategories.list
i guideCategories.list
.
Metody
Interfejs API obsługuje te metody dotyczące zasobów i18nLanguages
:
- list
- Zwraca listę języków aplikacji obsługiwanych przez stronę YouTube.
Wypróbuj teraz
Reprezentacja zasobu
Struktura JSON poniżej przedstawia format zasobu i18nLanguages
:
{
"kind": "youtube#i18nLanguage",
"etag": etag,
"id": string,
"snippet": {
"hl": string,
"name": string
}
}
Właściwości
Tabela poniżej zawiera właściwości widoczne w tym zasobie:
Właściwości |
kind |
string
Określa typ zasobu interfejsu API. Wartość będzie wynosić youtube#i18nLanguage . |
etag |
etag Etag tego zasobu. |
id |
string Identyfikator używany przez YouTube do jednoznacznego identyfikowania języka. |
snippet |
object
Obiekt snippet zawiera podstawowe informacje o języku i18n, takie jak jego kod i nazwa. |
snippet.hl |
string
Kod BCP-47, który jednoznacznie identyfikuje język. |
snippet.name |
string
Nazwa języka w postaci języka określonego za pomocą parametru hl metody i18nLanguage.list . |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-08-21 UTC.
[null,null,["Ostatnia aktualizacja: 2025-08-21 UTC."],[[["\u003cp\u003eThe 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.\u003c/p\u003e\n"],["\u003cp\u003eEach i18nLanguage resource includes a language code and a name, with the language code being usable as the value for the \u003ccode\u003ehl\u003c/code\u003e parameter in API calls like \u003ccode\u003evideoCategories.list\u003c/code\u003e and \u003ccode\u003eguideCategories.list\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe i18nLanguages resource can be retrieved using the \u003ccode\u003ei18nLanguages.list\u003c/code\u003e method, which provides a list of supported application languages.\u003c/p\u003e\n"],["\u003cp\u003eThe resource is represented in JSON format, containing properties such as \u003ccode\u003ekind\u003c/code\u003e (identifying the resource type), \u003ccode\u003eetag\u003c/code\u003e, \u003ccode\u003eid\u003c/code\u003e, and a \u003ccode\u003esnippet\u003c/code\u003e object with details like the \u003ccode\u003ehl\u003c/code\u003e code and the language \u003ccode\u003ename\u003c/code\u003e.\u003c/p\u003e\n"]]],["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"],null,["# I18nLanguages\n\nAn **i18nLanguage** resource identifies an application language that the YouTube website supports. The application language can also be referred to as a UI language. For the YouTube website, an application language could be automatically selected based on Google Account settings, browser language, or IP location. A user could also manually select the desired UI language from the YouTube site footer. \n\nEach `i18nLanguage` resource identifies a language code and a name. The language code can be used as the value of the `hl` parameter when calling API methods like `videoCategories.list` and `guideCategories.list`.\n\nMethods\n-------\n\nThe API supports the following methods for `i18nLanguages` resources:\n\n[list](/youtube/v3/docs/i18nLanguages/list)\n: Returns a list of application languages that the YouTube website supports.\n [Try it now](/youtube/v3/docs/i18nLanguages/list#usage).\n\nResource representation\n-----------------------\n\nThe following JSON structure shows the format of a `i18nLanguages` resource: \n\n```text\n{\n \"kind\": \"youtube#i18nLanguage\",\n \"etag\": etag,\n \"id\": string,\n \"snippet\": {\n \"hl\": 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#i18nLanguage`. |\n| `etag` | `etag` The Etag of this resource. |\n| `id` | `string` The ID that YouTube uses to uniquely identify the i18n language. |\n| `snippet` | `object` The `snippet` object contains basic details about the i18n language, such as its language code and name. |\n| snippet.`hl` | `string` A BCP-47 code that uniquely identifies a language. |\n| snippet.`name` | `string` The name of the language as it is written in the language specified using the `i18nLanguage.list` method's [hl](/youtube/v3/docs/i18nLanguages/list#hl) parameter. |"]]