AI YAML Translator
Translate YAML files and locale files into any language with AI, keeping keys, comments, anchors and formatting unchanged.
Input
Protected by Cloudflare Turnstile
Output
Readme
Tool description
This tool translates YAML files into another language with AI. Use it for Rails, Symfony, Hugo or Jekyll locale files, configuration with user-facing text, or any other YAML document. Open a YAML file, pick the language, and you get the same file with translated text.
The file is read in your browser with a YAML parser that keeps the document as written. Only string values are sent for translation, together with their path (such as en.errors.not_found), and they are put back in the same places. Comments, keys, anchors, block styles and quoting stay the way they were.
Features
- Translates string values at any depth in maps and lists. Map keys are never translated.
- Keeps comments, blank lines, anchors and aliases, and
|and>block scalars. - Adds quotes only when a translation would otherwise change the meaning of the YAML, for example a translation that reads
trueor contains:. - Keeps placeholders such as
%{count},{name}and%s. - Skips numbers, booleans, dates, URLs and identifiers.
- Supports files with several documents separated by
---.
Examples
# Messages for the sign-in page
en:
sign_in:
title: Sign in
hint: |
Use the email address
you registered with.
attempts: "%{count} attempts left"translated into French:
# Messages for the sign-in page
en:
sign_in:
title: Se connecter
hint: |
Utilisez l'adresse e-mail
avec laquelle vous vous êtes inscrit.
attempts: "%{count} tentatives restantes"Tips
Rails-style locale files start with the language code as the root key. The tool does not rename keys, so change en: to the new language code (for example fr:) after translating.
Up to 10,000 characters of text can be translated at once. Keys, comments and other values do not count toward the limit.
FAQ
Are my comments kept? Yes. Comments stay where they are and are not translated, so notes for developers remain unchanged.
Is my file uploaded? No. The file is parsed in your browser, and only the text values and their paths are sent to the AI.