File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,14 @@ checks translation resources for several different locales:
400
400
3. If the translation still isn't found, Symfony uses the ``fallback `` configuration
401
401
parameter, which defaults to ``en `` (see `Configuration `_).
402
402
403
+ .. versionadded :: 2.6
404
+ The ability to log missing translations was introduced in Symfony 2.6.
405
+
406
+ .. note ::
407
+
408
+ When Symfony doesn't find a translation in the given locale, it will
409
+ add the missing translation to the log file.
410
+
403
411
.. _book-translation-user-locale :
404
412
405
413
Handling the User's Locale
Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ Configuration
48
48
* `profiler `_
49
49
* `collect `_
50
50
* :ref: `enabled <profiler.enabled >`
51
+ * `translator `_
52
+ * :ref: `enabled <translator.enabled >`
53
+ * `fallback `_
54
+ * `logging `_
51
55
52
56
secret
53
57
~~~~~~
@@ -464,6 +468,37 @@ and activate the data collectors by hand::
464
468
465
469
$profiler->enable();
466
470
471
+ translator
472
+ ~~~~~~~~~~
473
+
474
+ .. _translator.enabled :
475
+
476
+ enabled
477
+ .......
478
+
479
+ **type **: ``boolean `` **default **: ``false ``
480
+
481
+ Whether or not to enable the ``translator `` service in the service container.
482
+
483
+ fallback
484
+ ........
485
+
486
+ **default **: ``en ``
487
+
488
+ This option is used when the translation key for the current locale wasn't found.
489
+
490
+ For more details, see :doc: `/book/translation `.
491
+
492
+ logging
493
+ .......
494
+
495
+ .. versionadded :: 2.6
496
+ The ``logging `` option was introduced in Symfony 2.6.
497
+
498
+ **default **: ``true `` when the debug mode is enabled, ``false `` otherwise.
499
+
500
+ Logging can be disabled by setting this key to ``false ``.
501
+
467
502
Full default Configuration
468
503
--------------------------
469
504
@@ -581,6 +616,7 @@ Full default Configuration
581
616
translator :
582
617
enabled : false
583
618
fallback : en
619
+ logging : " %kernel.debug%"
584
620
585
621
# validation configuration
586
622
validation :
You can’t perform that action at this time.
0 commit comments