Skip to content

Update 4.2 deprecation #10973

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
Feb 8, 2019
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: 7 additions & 2 deletions translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ of text (called a *message*), use the
for example, that you're translating a simple message from inside a controller::

// ...
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;

public function index(TranslatorInterface $translator)
{
Expand Down Expand Up @@ -197,7 +197,7 @@ Message Placeholders

Sometimes, a message containing a variable needs to be translated::

use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;

public function index(TranslatorInterface $translator, $name)
{
Expand Down Expand Up @@ -230,6 +230,11 @@ method or the ``transchoice`` tag/filter in your :ref:`template <translation-tag
For much more information, see :ref:`component-translation-pluralization`
in the Translation component documentation.

.. versionadded:: 4.2

In 4.2 the ``Translator::transChoice()`` method has been deprecated in favor of
using ``Translator::trans()`` with "%count%" as the parameter driving plurals.

Translations in Templates
-------------------------

Expand Down