How to Create Translated Video Subtitles and Descriptions

Overview

There are 4 steps to create new subtitles or video descriptions in a new language:

  1. Find the related video identifier

  2. Edit the video-metadata.yml file

  3. Create the subtitles/descriptions file(s)

  4. Translate the VTT file(s)

  5. Commit your changes and open a Pull Request

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 

  1. Navigate to the wai-website-data repository .

  2. In “video-metadata.yml”, look for the id that matches the video-id found in previous step.
  3. 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.

  4. 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 .

  1. To find the path to the VTT files to translate, look at path and lang-folder attributes in “video-metadata.yml”.

    • path: path to VTT files, from “wai-videos” folder.
    • lang-folder (not always present): when set to true, means VTT files for a language are located in a subfolder named after the language shortcode.
  2. 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)

  1. Translate all text segments
  2. Keep the first line (WEBVTT)
  3. 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