Preparing & Translating Supported File Types

Video Subtitle Files (SubRip SRT)

 

Extension .srt
Smartling Identifier srt
*Example File subtitle.srt
*Resources SubRip

Smartling supports the translation of the subtitles of videos via SubRip SRT translation. SubRip SRT files are extracted text files that include subtitles and their timings from various video formats.  For best results, it is recommended that you upload the video file as visual context. Smartling automatically matches the subtitle strings with the uploaded video file or video URL.

This article covers:

  1. Directives (file prep)
  2. Translating Video Subtitle Files
  3. Uploading an SRT and Video Context File
  4. Updating an SRT or Video File

Directives

File directives are supported via our API. Inline directives are not supported. Directives are specified in comments within the files, in the following format:

API Parameter

smartling.[directive_name] = [value] 

Here are some examples of [directive_name], along with example values or paths.

entity_escaping

Exact delivery depends on file type.

Values auto (default) | true | yes | false | no
(case-insensitive)
Description

Controls whether base characters ( > < & " ) are "escaped" into entities when delivering translations. This can be set universally for the whole file via API, or by setting the directive at the top/start of the file. The directive can also be placed inline to control the behavior of specific strings.

To use inline:
 smartling.entity_escaping = false

String:
 smartling.entity_escaping = auto

Examples

For example, your translation might look like this:
This is an <hr> & " example string4

By default, using the "auto" setting, we will assume this is HTML from the <hr> tag.

When the translated file is downloaded, the translated string will be escaped as:
This is an <hr> &amp; &quot; example string4

Using smartling.entity_escaping = false will allow This is an <hr> & " example string4 to appear unescaped.

 

XML Characters (always escaped)

Character (name) Escape sequence

< (less-than)

&lt;

> (greater-than)

&gt;

& (ampersand)

&amp;

' (apostrophe or single quote)

&apos;

" (double-quote)

 &quot;

 

entity_escaping_type

Exact delivery depends on file type.

Values

html4 (default)|html5

(case-insensitive)

Description

By default, all html4 entities are unescaped, except the basic set: &lt; &gt; &amp; &quot;.

When this directive is set to html5, all html5 entities will be unescaped as well.

Examples

smartling.entity_escaping_type = html5 

 

entity_escaping_strategy

Values propagate | none
Description

Used to retain entity escaping for all non-base entities. For example normally we turn &copy; into © but if we use this new directive the translation will automatically update to use escaping from the source. For each entity character we'll check to see if it was escaped in the source and try to match (propagate) it in the target.

The default is none which is the current behavior, which recognizes HTML4 entities only - if HTML5 entities are required as well, you must use the entity_escaping_type=propagate directive.


propagate will only affect non-base entities - all named entities except &amp; , &quot;, &lt;, &gt; . Base entities continue to be controlled by HTML detection and the entity_escaping directive.


If the same character is both escaped and unescaped in the same string propagate will return the characters in the translation escaped in the same order as they were in the source. However, if there are a different number of characters in the translation where the translation process removed or added some and the escaping is inconsistent among them, propagate will escape all entities for that character.

This directive can be placed inline, in the API or in a template (consult your SA about configuring directive templates).

This does not affect source content at all - so using it will not result in new strings.

Numerical entities are not considered at all with this directive, and are treated normally.

Examples

To use inline:
smartling.entity_escaping_strategy = propagate

 

whitespace_trim

Values 

on|yes|true or off|no|false or leading|trailing

The default value is on

Description 

A whitespace is any character or series of characters that represent horizontal or vertical space in typography. When rendered, a whitespace character is not a visible mark, but does occupy an area or space on a page.

Although whitespaces are necessary within a string (typically to separate words), unnecessary whitespaces can be found at the start of a string (leading) and at the end of a string (trailing).

With this directive, you can trim whitespaces, as it enables or disables whitespace trim management for the ingested strings.

Whitespace is optionally trimmed from content then re-inserted on download for convenience so that translators do not have to manage the extra spaces. However, content owners may want to retain surrounding whitespace so that translators can manipulate it during translation.

By default, the leading and trailing whitespaces are trimmed.

You can choose to disable trimming or specify trimming for leading or trailing whitespaces.

The directive can be used inline or as the API request parameter.

Examples 

smartling.whitespace_trim=on

Smartling will trim leading and trailing whitespaces (default)

smartling.whitespace_trim=off

Smartling will not trim leading or trailing whitespaces

smartling.whitespace_trim=leading

Smartling will trim only leading whitespaces

smartling.whitespace_trim=trailing

Smartling will trim only trailing whitespaces

 

Translating Video Subtitle Files

Smartling allows you to translate SubRip (SRT) files with Visual Context. When the user in the CAT Tool clicks the target string, the video automatically plays for that specific string. on the Translators can loop, pause, and adjust the playback rate of the video context for the most accurate subtitle translations.

When you upload an SRT file to Smartling, you'll be prompted to add your video link in the same step. Make sure you have both assets ready, or you won't be able to complete your upload.

Uploading an SRT and Video Context File

  1. Do one of the following: 
    • In the New Experience, from your chosen project, click the Files tab > Upload Files
    • In the Classic Experience, from your chosen project, go to Content > Files and click Upload Files.
  2. Upload your SRT file (one file at a time)
  3. Once the SRT file is uploaded in your Smartling project, go to the Context Dashboard and upload the video file for visual context
    • Choose to upload a video file or link a video URL
  4. Choose to match with strings in a file and search for the SRT file name in the field

Alternatively, if you do not have the URL ready at the time of SRT upload, you can add the URL at a later stage, via the Context tab. See Add a Video URL for Subtitle Translation for more information.

What happens Next?

Once your SRT and video files have been added to Smartling, you'll see them in your Files list. You may experience a slight delay with the video thumbnail until the best frame is loaded.

Keep in mind the following when adding your video file link:

  • It must be publicly accessible
  • It can't be a link to a video that's embedded in a web page
  • It can't be a link that previews the video in a browser

Updating an SRT or Video File

If you modify your original video or subtitles, you can update these assets in Smartling for retranslation by deleting the original SRT file, and repeating the steps to uploading an SRT and video context file.

  1. To delete the original SRT file, do one of the following:
    • In the New Experience, from your media project, click the Files tab and then click the three dots.
    • In the Classic Experience, from your media project, go to Content > Files and click the three dots.
  2. Select Delete File from the dropdown.
  3. Next, repeat the steps to uploading an SRT and video context file.

Video Tutorial: Translating Video Subtitles in Smartling


Timestamps:

Step 1: Create a .srt or .vtt file 00:06
Step 2: Check the segmentation
00:51
Step 3: Upload the subtitle file to Smartling
02:06
Step 4: Upload the video as visual context
02:45
Step 5: Authorize the job
03:34
What your linguists see
03:45
Step 6: Download the completed translations
04:14
Step 7: Add the translated subtitles to your video
04:32
   a. Closed captions
04:41
   b. Open captions
04:56
Help & Support
05:08

Was this article helpful?