Create a free account and get 30,000 characters monthly for free to translate your content with our AI-powered localization service.
No credit card required to get started!
Translating YAML localization files is straightforward with our AI-powered tool. Follow these steps to get a fully translated YAML file in minutes:
.yaml or .yml file content into the editor above.es, de, ja, zh)..yaml file ready to commit to your repository.YAML (YAML Ain't Markup Language) is a human-readable data serialization format widely used for configuration files and localization in modern software development. Its clean, indentation-based syntax makes it easy to read and write compared to JSON or XML.
YAML files use the .yaml or .yml extension and are the standard localization format for Ruby on Rails, Symfony (PHP), Vue i18n, Flutter ARB, Spring Boot, and many other frameworks. A single YAML file typically holds all translated strings for one language.
Because YAML supports nested keys, lists, and inline comments, it is particularly well-suited for organizing large sets of UI strings in a hierarchical structure that mirrors the application's component tree.
A typical YAML localization file uses nested key-value pairs to organize strings by feature or component. Here is an example of a common YAML structure:
# Application configuration
app:
name: "My Application"
version: "2.0.0"
description: "A powerful tool for managing your workflow"
navigation:
home: "Home"
about: "About Us"
contact: "Contact"
login: "Sign In"
logout: "Sign Out"
messages:
welcome: "Welcome back, {{name}}!"
error: "An unexpected error occurred. Please try again."
success: "Your changes have been saved successfully."
buttons:
save: "Save"
cancel: "Cancel"
delete: "Delete"
confirm: "Confirm"key: "Translated string".button.save: "Save".- prefix.# provide context for translators and are optionally preserved.{{name}} or %{count} are preserved as-is and never translated.Below is a realistic YAML localization file showing nested keys, interpolation, and comment usage as found in production Rails and Vue i18n projects:
# en/messages.yaml
user:
greeting: "Hello, {{name}}!"
farewell: "Goodbye, {{name}}. See you soon!"
profile:
title: "Your Profile"
subtitle: "Manage your account settings"
avatar: "Profile Picture"
errors:
notFound: "The page you are looking for does not exist."
unauthorized: "You are not authorized to view this page."
serverError: "A server error occurred. Please contact support."
forms:
required: "This field is required."
email: "Please enter a valid email address."
minLength: "Must be at least {{min}} characters."Our AI translates all string values while leaving keys, interpolation variables, and structural indentation completely unchanged. The result is a drop-in replacement file for your target language.
YAML is one of the most popular formats for software localization because it strikes the right balance between human readability and machine parsability. Developers can edit YAML files directly without special tooling, while automated pipelines can process them reliably.
In a typical localization workflow, you maintain one YAML file per language (e.g., en.yml, de.yml, ja.yml) inside a locales or i18n directory. The source language file is treated as the reference, and translated copies are generated for each target locale.
YAML localization files are supported by a wide range of popular frameworks across multiple languages and platforms:
config/locales/en.yml). The Rails i18n gem supports nested keys, pluralization, and interpolation out of the box.translations/messages.en.yaml power the Symfony Translation component..properties files, the Spring YAML support in application.yml and community libraries like i18n4java extend YAML to localization.easy_localization package and similar Flutter i18n libraries use YAML files to manage translations for mobile and desktop apps..yaml files directly as Vue components.next-i18next and react-i18next can load YAML translation files through custom backends, making them a popular choice for Next.js localization.Our AI Glossary Generation feature helps you maintain consistent terminology across all your YAML localization files. Enable saving and reusing it by toggling Generate & Save Glossary in the translation options:
{{name}}, %{count}, :variable, and ICU message format variables are detected and left untouched during translation.YAML translation is used across a wide range of application types and development workflows:
config/locales/en.yml into additional language files for multilingual Rails applications.translations/messages.en.yaml and domain-specific translation files for Symfony-based websites and APIs.assets/lang/en.yaml localization files for cross-platform Flutter apps targeting multiple markets._data/ YAML files for site-wide strings, Hugo uses i18n/ YAML files, and Gatsby supports YAML via gatsby-plugin-react-i18next.Both YAML and JSON are widely used for localization files, but they have different strengths. YAML's human-readable syntax, support for comments, and compact multiline strings make it preferred in communities like Ruby and PHP where developers frequently edit translation files by hand.
JSON is more universally supported across JavaScript ecosystems (React, Angular, Vue) and is easier to parse programmatically. If your project uses both formats, L10n.dev supports both — you can translate JSON files on the JSON Translation page and YAML files here.
For most projects the choice of format is dictated by the framework you use. If you use Rails, Symfony, or Vue i18n, YAML is the natural choice. If you use Angular i18next, React i18next, or Next.js, JSON is more common. L10n.dev handles both equally well.
All YAML structural elements are preserved: keys, indentation, nesting, anchors (&), aliases (*), comments (#), and list syntax (-). Interpolation placeholders like {{variable}}, %{name}, and :symbol are always left unchanged. Only the human-readable string values are translated.
Yes. Our AI detects common interpolation patterns used by Rails (%{name}), Vue i18n ({name}), Symfony (%variable%), Flutter ({name}), and ICU message format. These variables are preserved exactly as written and are never translated or modified.
Paste your .yaml or .yml file content into the editor above, set the target language code (e.g., fr, de, ja, zh), and click Translate. The AI returns a fully translated YAML file with all keys and structure preserved. Download the result as a .yaml file.
Enabling Generate & Save Glossary allows you to paste existing translated YAML content alongside your source file. The AI extracts recurring terms and uses them as a translation guide, ensuring product names, feature labels, and domain terms are translated consistently throughout the file and across future translations.
This page works well for individual YAML files up to a few hundred kilobytes. For bulk YAML translation or very large files, use the I18N File Translation page which supports file uploads up to 5 MB and provides more reliable delivery for large-scale localization projects.