@@ -327,14 +327,6 @@ use for translation::
327
327
'fr_FR'
328
328
);
329
329
330
- $translator->transChoice(
331
- '{0} There are no apples|{1} There is one apple|]1,Inf[ There are %count% apples',
332
- 10,
333
- [],
334
- 'messages',
335
- 'fr_FR'
336
- );
337
-
338
330
Extracting Translation Contents and Updating Catalogs Automatically
339
331
-------------------------------------------------------------------
340
332
@@ -520,43 +512,43 @@ checks translation resources for several locales:
520
512
#. If the translation still isn't found, Symfony uses the ``fallbacks `` option,
521
513
which can be configured as follows:
522
514
523
- .. configuration-block ::
524
-
525
- .. code-block :: yaml
526
-
527
- # config/packages/translation.yaml
528
- framework :
529
- translator :
530
- fallbacks : ['en']
531
- # ...
532
-
533
- .. code-block :: xml
534
-
535
- <!-- config/packages/translation.xml -->
536
- <?xml version =" 1.0" encoding =" UTF-8" ?>
537
- <container xmlns =" http://symfony.com/schema/dic/services"
538
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
539
- xmlns : framework =" http://symfony.com/schema/dic/symfony"
540
- xsi : schemaLocation =" http://symfony.com/schema/dic/services
541
- https://symfony.com/schema/dic/services/services-1.0.xsd
542
- http://symfony.com/schema/dic/symfony
543
- https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
544
-
545
- <framework : config >
546
- <framework : translator >
547
- <framework : fallback >en</framework : fallback >
548
- <!-- ... -->
549
- </framework : translator >
550
- </framework : config >
551
- </container >
552
-
553
- .. code-block :: php
554
-
555
- // config/packages/translation.php
556
- $container->loadFromExtension('framework', [
557
- 'translator' => ['fallbacks' => ['en']],
558
- // ...
559
- ]);
515
+ .. configuration-block ::
516
+
517
+ .. code-block :: yaml
518
+
519
+ # config/packages/translation.yaml
520
+ framework :
521
+ translator :
522
+ fallbacks : ['en']
523
+ # ...
524
+
525
+ .. code-block :: xml
526
+
527
+ <!-- config/packages/translation.xml -->
528
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
529
+ <container xmlns =" http://symfony.com/schema/dic/services"
530
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
531
+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
532
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
533
+ https://symfony.com/schema/dic/services/services-1.0.xsd
534
+ http://symfony.com/schema/dic/symfony
535
+ https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
536
+
537
+ <framework : config >
538
+ <framework : translator >
539
+ <framework : fallback >en</framework : fallback >
540
+ <!-- ... -->
541
+ </framework : translator >
542
+ </framework : config >
543
+ </container >
544
+
545
+ .. code-block :: php
546
+
547
+ // config/packages/translation.php
548
+ $container->loadFromExtension('framework', [
549
+ 'translator' => ['fallbacks' => ['en']],
550
+ // ...
551
+ ]);
560
552
561
553
.. deprecated :: 4.4
562
554
0 commit comments