meta data for this page
  •  
Translations of this page:

Translation

phpList core uses the Symfony Translation component. Translation strings are extracted from the code into XLIFF catalogs and loaded via Symfony's translator service — there is no gettext/.po system involved.

Where translations live

Catalogs are stored in resources/translations/, one file per domain and locale, following Symfony's domain.locale.xlf naming convention:

- messages.en.xlf — application strings (log/console messages, exception messages, email content, config descriptions, etc.)
- security.en.xlf — Symfony's built-in security-related messages
- validators.en.xlf — Symfony Validator constraint messages

Only English (en) ships today. Adding a new language means messages.<locale>.xlf (and optionally security.<locale>.xlf /validators.<locale>.xlf) with translated <target> values.

Adding new strings

    
1. Write the string literally inside a trans() call in code.
2. Run the extractor to regenerate the catalog: php bin/console translation:extract --force en --format=xlf

This adds any new strings to messages.en.xlf. Translating to another locale means creating that locale's XLIFF file and filling in the <target> nodes.

Translating via Weblate

Translating strings by hand isn't required — this project is configured on Weblate. Translators can work in the Weblate UI, and Weblate opens merge requests back to the repository automatically with the updated XLIFF files. New/changed source strings in messages.en.xlf are picked up by Weblate for translation into other locales.