@@ -509,18 +509,22 @@ must be named according to the following path: ``domain.locale.loader``:
509
509
``php ``, ``yaml ``, etc).
510
510
511
511
The loader can be the name of any registered loader. By default, Symfony
512
- provides many loaders:
512
+ provides many loaders which are selected based on the following file extensions :
513
513
514
- * ``.yaml ``: YAML file
515
- * ``.xlf ``: XLIFF file;
516
- * ``.php ``: Returning a PHP array;
514
+ * ``.yaml ``: YAML file (you can also use the `` .yml `` file extension);
515
+ * ``.xlf ``: XLIFF file (you can also use the `` .xliff `` file extension) ;
516
+ * ``.php ``: a PHP file that returns an array with the translations ;
517
517
* ``.csv ``: CSV file;
518
518
* ``.json ``: JSON file;
519
519
* ``.ini ``: INI file;
520
- * ``.dat ``, ``.res ``: ICU resource bundle;
521
- * ``.mo ``: Machine object format;
522
- * ``.po ``: Portable object format;
523
- * ``.qt ``: QT Translations XML file;
520
+ * ``.dat ``, ``.res ``: `ICU resource bundle `_;
521
+ * ``.mo ``: `Machine object format `_;
522
+ * ``.po ``: `Portable object format `_;
523
+ * ``.qt ``: `QT Translations TS XML `_ file;
524
+
525
+ .. versionadded :: 6.1
526
+
527
+ The ``.xliff `` file extension support was introduced in Symfony 6.1.
524
528
525
529
The choice of which loader to use is entirely up to you and is a matter of
526
530
taste. The recommended option is to use YAML for simple projects and use XLIFF
@@ -877,3 +881,7 @@ Learn more
877
881
.. _`Translatable Extension` : https://github.com/doctrine-extensions/DoctrineExtensions/blob/main/doc/translatable.md
878
882
.. _`Translatable Behavior` : https://github.com/KnpLabs/DoctrineBehaviors
879
883
.. _`Custom Language Name setting` : https://docs.lokalise.com/en/articles/1400492-uploading-files#custom-language-codes
884
+ .. _`ICU resource bundle` : https://github.com/unicode-org/icu-docs/blob/main/design/bnf_rb.txt
885
+ .. _`Portable object format` : https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html
886
+ .. _`Machine object format` : https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html
887
+ .. _`QT Translations TS XML` : https://doc.qt.io/qt-5/linguist-ts-file-format.html
0 commit comments