Skip to content

Removed the PHP templates from Symfony 4.0 docs #10024

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
Jul 5, 2018
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
21 changes: 6 additions & 15 deletions translation/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,16 @@ When maintaining an application or bundle, you may add or remove translation
messages and forget to update the message catalogues. The ``debug:translation``
command helps you to find these missing or unused translation messages templates:

.. configuration-block::

.. code-block:: twig

{# messages can be found when using the trans/transchoice filters and tags #}
{% trans %}Symfony is great{% endtrans %}
.. code-block:: twig

{{ 'Symfony is great'|trans }}
{# messages can be found when using the trans/transchoice filters and tags #}
{% trans %}Symfony is great{% endtrans %}

{{ 'Symfony is great'|transchoice(1) }}

{% transchoice 1 %}Symfony is great{% endtranschoice %}

.. code-block:: php
{{ 'Symfony is great'|trans }}

// messages can be found when using the trans() and transChoice() methods
$view['translator']->trans("Symfony is great");
{{ 'Symfony is great'|transchoice(1) }}

$view['translator']->transChoice('Symfony is great', 1);
{% transchoice 1 %}Symfony is great{% endtranschoice %}

.. caution::

Expand Down