Skip to content

Commit d41c5fd

Browse files
flolivaudNyholm
authored andcommitted
Auto add missing in production (php-translation#34)
1 parent 098360e commit d41c5fd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

symfony/auto-add-missing.rst

+13
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,16 @@ Usage
2222

2323
That's it. You do not have to do anything more. Translations will automatically
2424
pop up in your storage.
25+
26+
Production environment
27+
----------------------
28+
29+
Note: The ``TranslationDataCollector`` is not used in production environment (this file is linked with the profiler).
30+
For use in production, you need to decorate the translator :
31+
32+
.. code-block:: yaml
33+
34+
translator.data_collector:
35+
class: Symfony\Component\Translation\DataCollectorTranslator
36+
decorates: translator
37+
arguments: ['@translator.data_collector.inner']

0 commit comments

Comments
 (0)