YAML

Rails locale files without the whitespace accidents

YAML has been the language of config/locales since Rails 2.2, and it is exactly as indentation sensitive as every Rails developer has learned the hard way. locamorph parses .yml and .yaml trees, treats the locale root correctly, and exports with stable indentation and key order so the file your app loads is never the casualty of a translation pass.

Round trip tested: an exported YAML file parses back to the same keys, values and plurals that went in.

config/locales/fr.yml
fr:
  menu:
    home: Accueil
    projects: Projets
  checkout:
    title: Récapitulatif de commande
    items: "{count, plural, one {# article} other {# articles}}"
A Rails style locale tree: language root, nested keys, and an ICU plural in a quoted value.
.yml .yaml Import yes Export yes Nesting flat or nested Plurals ICU messages Comments not carried

In locamorph

How locamorph handles YAML

structure

Trees in, trees out

Nested locale trees import as dotted keys and export back as trees. Flat files stay flat. The shape of your file is a setting, not an accident.

plurals

Plurals as ICU messages

All CLDR forms travel inside one ICU message, so a plural never collapses to a single form between import and export.

safety

Indentation you can trust

Exports follow the project’s indentation settings every time. No mixed tabs, no drifting levels, no Monday morning YAML parse error.

Ecosystem

Where YAML translations live

Ruby on Rails is the home crowd: the i18n gem loads YAML from config/locales by default. Symfony supports it alongside XLIFF, and static site generators like Hugo and Jekyll use YAML translations too. Translators tend to like it; fewer braces and quotes than JSON.

Typical flow: GitHub or GitLab watches the repo, new keys import on push, and finished translations return as a merge request that only touches changed strings.

Bring your config/locales

Import a YAML locale file on the free plan and get it back with the same structure, the same indentation and only the translations changed.