If you want to create and publish videos on your website with subtitles translated into different languages, follow the steps below to seamlessly integrate them using Transifex Live.
Upload Subtitles for Translation
Create a Subtitle File: Start by creating a file that contains the subtitles for your video.
Upload to Transifex: Upload this subtitle file as a new resource under a file-based project in Transifex.
Translate into Multiple Languages: Once the subtitles are uploaded, have them translated into your desired languages.
Export Translated Subtitles: After the translation is complete, export the translated subtitles to create separate video versions—one for each language (e.g., Russian, Spanish, Portuguese). [Learn more about localizing subtitles with Transifex here].
Localize video URLs via Transifex Live
To ensure the correct version of the video is displayed based on your website visitor's language, you need to translate the video URLs using Transifex Live.
Here’s how:
Identify the Original Video URL: Let's say we have an example video with the URL:
https://example.com/video
.Create Language-Specific URLs:
Once you’ve completed the subtitle translations, you can create a unique URL for each video version. For example:For Spanish:
https://example.com/es/video
For Portuguese:
https://example.com/pt/video
Replace the Video URL Based on Language:
If a Spanish-speaking user visits the Spanish version of your website, Transifex Live will swap the default video URL (https://example.com/video
) with the Spanish one (https://example.com/es/video
), ensuring the right subtitles are displayed.
Add localization code for Transifex Live
To enable URL localization with Transifex Live, include the tx-content="translate_urls" attribute in your website's code to allow the URLs to be replaced automatically.
<video tx-content="translate_urls" controls>
<source src="https://example.com/video" type="video/mp4">
</video>
More information about translating links can be found under our documentation here.
💡Tip
Looking for more help? Get support from our Transifex Community Forum!
Find answers or post to get help from Transifex Support and our Community.