General yaml format

YAML is widely used for localization in Ruby on Rails, Symfony PHP projects, and Vue.js applications. Its indented key-value syntax is more readable than JSON for complex nested structures and supports multi-line strings and comments natively — useful for documenting translator context directly in the file.

YAML locale files use indented key hierarchies where each level of indentation creates a nested namespace. The top level is typically the locale code wrapping the key tree — the standard convention for Ruby on Rails locale files. String values can be written inline or as block scalars for multi-line text. Interpolation syntax varies by framework: Rails uses percent-wrapped variable names, Symfony uses double-brace syntax.

Best practice: avoid special YAML characters in string values — colons, hashes, square brackets, and curly braces should be quoted to prevent YAML parsing errors. Use block scalar notation for long strings to maintain readability. Keep locale files consistently structured across languages to make missing translation detection easier. Language Monster supports general YAML format and preserves nested key structure through translation.

Developer Localization Guides

Vue.js & Nuxt Localization

Read More File Formats