Symfony Translation is a PHP library and framework component for internationalizing applications. It provides a complete system for managing message catalogs, handling locale-aware string translation, and formatting messages using ICU MessageFormat syntax to support pluralization, gender, and conditional selection. The component organizes translatable strings into named domains, supports key-based lookup that decouples source text from localized versions, and offers deferred rendering through translatable objects that store parameters and render only when output is needed.
The library distinguishes itself through its comprehensive XLIFF support across versions 1.2 through 2.2, including the ability to attach contextual notes for translators and handle plural, gender, and select variations. It provides a push-pull interface for synchronizing translation content with third-party services, a fallback locale chain resolution system, and the ability to register custom loaders and dumpers for non-standard file formats. The component also includes console commands for extracting translation keys from source files, synchronizing catalogs, and identifying missing or unused translations.
Beyond core translation, the component integrates with broader application infrastructure including locale-aware routing, session-based locale persistence, and automatic locale detection from HTTP headers. It supports pseudolocalization for testing, an identity translator for development, and validation of translation file syntax. The library manages translation resource files organized by domain, locale, and format, with override priority across application bundles.