meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
phplist4:core:translation [2026/09/30 09:25] – add docs tatevikphplist4: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's translator service — there is no gettext/.po system involved.+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**+**Where translations live**
                      
-  Catalogs are stored in resources/translations/, one file per domain and locale, following Symfony's domain.locale.xlf naming convention:+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.)   - messages.en.xlf — application strings (log/console messages, exception messages, email content, config descriptions, etc.)
Line 11: Line 11:
   - validators.en.xlf — Symfony Validator constraint 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.+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**+**Adding new strings**
              
   1. Write the string literally inside a trans() call in code.   1. Write the string literally inside a trans() call in code.
-  2. Run the extractor to regenerate the catalog: +  2. Run the extractor to regenerate the catalog: php bin/console translation:extract --force en --format=xlf
-       +
-  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.+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 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.+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.