Translate the text in your YAML language file

Translate messages in a YAML or YML file with the aim of preserving its structure. Upload your language file, choose a target language and review the result with the project that reads it.

forgefile.com YAML

YAML workflow

Translation
Drop your file here or click to browse from your device
Formatting preserved .YAML, .YML

Translation example

A YAML strings file, English to Spanish

Application strings with nested keys and a list, written for this page. Keys and nesting stay, the values are translated.

Source

app-strings-en.yaml → app-strings-es.yaml before translation

Result

app-strings-en.yaml → app-strings-es.yaml after translation
  • Keys and nesting identical

  • Parses as valid YAML

  • Every value translated

2026-10-08 verified — Amanda Lee

YAML features

Start with a focused language file

Use the messages intended for your readers, keeping commands and other operational values out of the translation task.

See the whole example

The paired previews show every line of the sample. Download both files to compare nested keys and the three onboarding steps.

Work from your YAML language file

Choose YAML that contains reader-facing text

Use YAML translation for a language file containing labels, onboarding text or other messages. Keep operational configuration separate: a command, path or service name can be a string without being something you should translate. Start from the file your project uses for localized text.

Both .yaml and .yml identify YAML files. The YAML 1.2.2 specification describes indentation-based structure and scalar styles. Quoting and block notation affect how text is read, so compare parsed values as well as how the file looks.

Compare the complete hiking-app example

The English and Spanish files below contain ten text values under the same nested keys. All ten are translated, including three ordered onboarding steps. Both files parse successfully, and the previews show the entire example.

The title changes from Trail Notes to Notas de ruta. Check whether the product name should be translated or kept in its original form. The example has no anchors, aliases, comments or multiline block scalars, so it does not test preservation of those features.

Load the result with your project's parser

Check the translated file with the same YAML parser and settings your project uses. Compare nested key paths and list order, then read the resulting messages in context. A successful parse does not confirm that the application selects the intended language.

If your project uses a locale code as a top-level key, check that wrapper and the expected filename before integration. The sample has no locale wrapper. Review longer messages for line wrapping in the interface, and keep your original file available until the translated version has been tested.

Translate and review a YAML file

  1. 1

    Select the messages

    Choose the YAML or YML file that contains your localized text. Save an unchanged copy.

  2. 2

    Upload YAML and select a language

    Choose the target language for the file you uploaded.

  3. 3

    Parse and compare the result

    Use your project parser to read the download. Compare nested keys, value types and list order with the original.

  4. 4

    Check the language in context

    Load the result in your project. Review names, line wrapping and any locale-specific filename or wrapper before release.

Questions about YAML localization

Is YML different from YAML for this task?

They are filename extensions for the same format. Keep the extension and filename your project expects when integrating the reviewed file.

Does the example verify anchors, comments or block scalars?

No. It contains nested mappings and a list of short strings. If your file uses other YAML features, compare them separately after translation and test them with your project parser.

Should I translate an entire deployment configuration?

Use a dedicated language file where possible. Commands, paths and resource identifiers can be strings that must retain their technical meaning. A deployment configuration is not automatically a localization file.

Will the sample tell me how to name a Rails locale file?

No. Its top-level keys are app, onboarding and errors; it has no language-code wrapper. Follow your project convention for the filename and locale key, then check that the application loads the intended messages.

Translate your YAML text

Upload the language file you want to translate. Compare the result with the original and test it in your project before release.