Yaml Symfony format
Symfony's YAML translation format organises locale files by domain — a named group of related strings. Each translation domain gets its own file: messages.en.yaml, validators.fr.yaml, security.de.yaml. This lets different parts of the application use separate translation files loaded independently at runtime, keeping payload sizes small and allowing targeted translation assignments.
Symfony YAML files follow standard YAML indented key-value syntax, but use the domain-based file naming convention where the locale code is embedded in the file name rather than at the root of the YAML hierarchy. Symfony supports ICU message format for pluralisation and uses double-brace syntax for named parameters.
Best practice: organise translation keys by domain based on application area rather than putting all strings in the default messages domain. Use the Symfony translation extractor command to generate translation files from source annotations automatically. Add translator notes using the trans() tag's comment parameter — these notes help translators understand context without seeing the PHP source. Language Monster detects Symfony YAML domain files by their naming convention and handles both YAML structure and Symfony-specific plural syntax.
