For the last few hours, I have been trying to find a solution to updating/uploading videos to many different languages throw the YouTube V3 API. I can set the defaultLanguage,
"defaultLanguage": string
I can set video title and description,
"title": string,
"description": string,
or maybe there is a way of uploading many different snippets in different languages?
"snippet": {
"publishedAt": datetime,
"channelId": string,
"title": string,
"description": string,
"thumbnails": {
(key): {
"url": string,
"width": unsigned integer,
"height": unsigned integer
}
},
I don't see a way of translating the title and descriptions.
I see that it might be possible to do with the "localized" property but, I do not know if it is even possible or if it is the best way to do it.
"localized": {
"title": string,
"description": string
},
I would like to have some suggestions since I'm so new to YouTube API and I find this would be a very easy question to answer if you knew the answer, I do not expect any code or a complex solution but just to be guided, thanks for the help.
I found the solution, localizations is what it's called.
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.videos.update
PUT https://www.googleapis.com/youtube/v3/videos?part=localizations&key={YOUR_API_KEY}
{
"id": "kE7dYgd3F8E", //https://www.youtube.com/edit?video_id=kE7dYgd3F8E
"localizations": {
"es-do": { //local codes, http://www.science.co.il/Language/Locale-codes.php
"title": "Translated title",
"description": "Translated description"
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With