Skip to content

[Translation] document the translation:extract command's --prefix option #20360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,15 @@ The ``translation:extract`` command looks for missing translations in:
Support for extracting Translatable objects has been introduced in
Symfony 5.3.

By default, when the ``translation:extract`` command creates new entries in the
translation file, it uses the same content as both the source and the pending
translation. The only difference is that the pending translation is prefixed by
``__``. You can customize this prefix using the ``--prefix`` option:

.. code-block:: terminal

$ php bin/console translation:extract --force --prefix="NEW_" fr

.. _translation-resource-locations:

Translation Resource/File Names and Locations
Expand Down
Loading