Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b7425ad

Browse files
committed
[The Book, Translations] fixed domain cascading doc
1 parent 74cc7c2 commit b7425ad

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

book/translation.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,14 +494,21 @@ Symfony2 will now look for the message in the ``admin`` domain of the user's
494494
locale.
495495

496496
In some cases, you may need a fallback mechanism: you can also provide an
497-
array of domains instead of a simple string:
497+
array of domains instead:
498498

499-
$this->get('translator')->trans('Do something', array(), array('specialized', 'messages', 'last_resort'));
499+
$this->get('translator')->trans(
500+
'Do something',
501+
array(),
502+
array('specialized', 'messages', 'last_resort')
503+
);
500504

501505
At first, the translator will look for the message in the ``specialized``
502506
domain. Without result, it will then look in the ``messages`` domain, and
503507
so on…
504508

509+
.. versionadded:: 2.4
510+
Support for translation domain cascading was added in Symfony 2.4.
511+
505512
.. index::
506513
single: Translations; User's locale
507514

0 commit comments

Comments
 (0)