meta data for this page
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| phplist4:core:translation [2025/09/09 10:00] – created tatevik | phplist4:core:translation [2026/09/30 09:32] (current) – fix style tatevik | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | translation | + | **Translation** |
| + | |||
| + | phpList core uses the Symfony Translation component. Translation strings are extracted from the code into XLIFF catalogs and loaded via Symfony' | ||
| + | |||
| + | **Where translations live** | ||
| + | |||
| + | Catalogs are stored in resources/ | ||
| + | |||
| + | - messages.en.xlf — application strings (log/ | ||
| + | - security.en.xlf — Symfony' | ||
| + | - validators.en.xlf — Symfony Validator constraint messages | ||
| + | |||
| + | Only English (en) ships today. Adding a new language means messages.< | ||
| + | |||
| + | **Adding new strings** | ||
| + | |||
| + | 1. Write the string literally inside a trans() call in code. | ||
| + | 2. Run the extractor to regenerate the catalog: php bin/ | ||
| + | |||
| + | This adds any new strings to messages.en.xlf. Translating to another locale means creating that locale' | ||
| + | |||
| + | **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. | ||
| + | |||
| + | |||
| + | |||
| + | |||