How to Create Translated Video Subtitles and Descriptions
Overview
There are 4 steps to create new subtitles or video descriptions in a new language:
Initial step: Declare your intent
In accordance with the WAI Translations process, please always declare your intent and wait for reply from WAI team before starting a translation.
Step 1: Find the related video identifier
If you want to create new subtitles/translated descriptions for a video, you have probably seen the video in a W3C WAI resource.
You now need to find the video identifier.
Look for the embedded video player in the code of the English version of the page. It looks similar to this:
The value of video-id
is the video identifier you need.
Step 2: Edit video-metadata.yml
WAI videos captions, subtitles and descriptions metadata are stored in “video-metadata.yml” in “wai-website-data” repository
-
Navigate to the wai-website-data repository .
-
In “video-metadata.yml”, look for the
id
that matches thevideo-id
found in previous step. -
Update the following video attributes
-
name
: name of the video.
Add your translated version to the list. -
subtitles
: available subtitles languages.
Add your language tag to the list. -
subtitles-ad
: available subtitles languages for the audio-described version of the video.
Add your language tag to the list. -
descriptions-ad
: available descriptions languages for the audio-described version of the video.
Add your language tag to the list.
-
-
Do not change the following attributes
main-page
path
lang-folder
captions
captions-ad
Step 3: Create the subtitles/descriptions file(s)
Captions, subtitles and descriptions are stored in WebVTT (.vtt
) files. VTT files are located in “wai-videos” folder, in “wai-website-data” repository .
-
To find the path to the VTT files to translate, look at
path
andlang-folder
attributes in “video-metadata.yml”.path
: path to VTT files, from “wai-videos” folder.lang-folder
(not always present): when set totrue
, means VTT files for a language are located in a subfolder named after the language shortcode.
-
Duplicate the English VTT file, with language shortcode added to the middle of the filename.
If files are stored into lang subfolders, create a subfolder for your language.
Step 4: Translate the VTT file(s)
- Translate all text segments
- Keep the first line (
WEBVTT
) - Do not edit time-intervals
Step 5: Commit your changes and open a Pull Request
Include the updated “video-metadata.yml” and the new translated VTT files.
Back to Top