PTC gives you Better Than Human AI translations for YAML files used in frameworks like Ruby on Rails, Laravel, and Symfony. Follow these steps to prepare and translate your .yml files using PTC.
Translating YAML Files with PTC: First-Time Setup
To get accurate, easy-to-maintain translations, you’ll need to:
- Add all translatable text to YAML files and use placeholders properly
- Set up your project in PTC
- Provide PTC with basic project context
- Receive the translations
Step 1: Add All Translatable Text to YAML Files
Your software should store every translatable string in a .yml
file using key-value pairs. PTC extracts the string values for translation.
Correct – All text in a .yml file
en:
homepage:
title: "Welcome to our website"
description: "Discover our products and services"
form:
submit: "Submit"
reset: "Reset"
Incorrect – Hardcoded text in code:
<%= "Welcome to our website" %>
If you hardcode user interface (UI) text in templates or scripts, PTC can’t access or translate it.
Step 2: Use Placeholders for Dynamic Content
Use placeholders for any part of a string that is dynamic, like a name, number, or date. Don’t break the sentence into multiple strings or concatenate values at runtime.
PTC supports all common placeholder formats, such as %{name}
, {name}
, and {{name}}
.
Correct – Full string with placeholders
en:
greeting: "Hello, %{user_name}! Today is %{current_date}."
Incorrect – Split strings
en:
greeting_start: "Hello, "
greeting_end: "! Today is "
Splitting strings can break sentence structure in other languages, which leads to incorrect translations.
Step 3: Create a PTC Account and Set Up Your Project
Once you sign up for a free 30-day trial, PTC gives you flexibility in how you connect your project. You can:
- Integrate with Git
Connect your GitHub, GitLab, or Bitbucket repository so PTC can monitor your files, translate new or updated strings, and send them back through merge requests. - Upload files manually
Try PTC without committing to full integration. Upload a YAML file, get translations back, and test how they work in your app. - Use the API
Send files to PTC and receive translations programmatically.
Once you pick a method, PTC will walk you through the next steps and help you prepare your project for translation.
Step 4: Provide Project Details and Select Target Languages
PTC uses context to deliver accurate translations. To make this possible, you’ll need to:
- Provide the name of your software
- Describe what it does and who it’s for
- Select the languages you want to translate into
This helps PTC adjust phrasing, tone, and terminology to match your product.
Step 5: Confirm Translated Files Were Sent to the Right Location
After PTC finishes translating, it gives you the translations in different ways depending on how you set up your project:
- Git integration: You’ll receive a merge request with the translated files.
- Manual upload: You can download the translated files as a ZIP archive.
- API: You’ll receive the translations in the API response.
Check the translated files to make sure everything looks correct:
- All expected translation were created
- The output path matches what your software expects
If you didn’t use Git, place the translated files in the right directory manually or adjust your configuration so your application knows where to find them.
If something doesn’t look right, go to your project’s Settings in the PTC dashboard to review output paths and file settings.
Step 6: Check the Translation Quality Score in PTC
Before you start using the translations, check your PTC dashboard for the translation quality score. PTC may ask for clarification in cases like:
- A translation exceeds the maximum length allowed for a target language
- A string could be interpreted in more than one way

Responding to questions and suggestions from PTC lets you:
- Improve translation quality
- Avoid layout problems caused by long or incorrect translations
- Teach PTC how to handle similar cases in future updates
Step 7: Test That Your Software Loads the Right Files
After you add the translated YAML files to your project, test your software in a development or staging environment.
Check that:
- Your software loads the correct
.yml
file for the selected language - Your language switcher or detection logic works
- You don’t see untranslated strings (if you do, these may be missing from the source file)
- Placeholders are correctly replaced with runtime values
Testing in a real environment is the best way to catch setup errors and confirm that translations are being applied throughout the software.
Bonus: Translate Content That’s Not Stored in YAML Files
Some parts of your product may include user-facing content that isn’t stored in .yml
files or tracked in version control. This often includes things like:
- Onboarding emails
- System-generated emails (like password reset or subscription confirmations)
- Release notes
You can translate this type of content using the Paste to translate feature in PTC:
- From the PTC dashboard, go to Translations → Paste to translate
- Paste your text and pick the target languages
- Copy the translated text and insert it where it belongs
PTC Keeps Your YAML Translations Up to Date
If you want translations to stay up to date automatically, the best option is to connect your code repository to PTC. When your YAML files change, PTC detects new or updated strings and translates them in the background. It then creates a merge request with the changes.
You don’t need to re-upload files or trigger updates manually. Your translations stay aligned with your product as it evolves.

Start Translating YAML Files with PTC
Start your free 30-day trial. PTC delivers Better Than Human Translations you can use right away, so you can focus on development while your YAML files stay translated and up to date.
