8000 Make FrameworkBundle configure FallbackLocaleProvider in the container · symfony/symfony@826daa0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 826daa0

Browse files
committed
Make FrameworkBundle configure FallbackLocaleProvider in the container
1 parent 372c776 commit 826daa0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/translation.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
use Symfony\Component\Translation\Extractor\ChainExtractor;
2828
use Symfony\Component\Translation\Extractor\ExtractorInterface;
2929
use Symfony\Component\Translation\Extractor\PhpExtractor;
30+
use Symfony\Component\Translation\FallbackLocaleProvider;
31+
use Symfony\Component\Translation\FallbackLocaleProviderInterface;
3032
use Symfony\Component\Translation\Formatter\MessageFormatter;
3133
use Symfony\Component\Translation\Loader\CsvFileLoader;
3234
use Symfony\Component\Translation\Loader\IcuDatFileLoader;
@@ -59,6 +61,7 @@
5961
'debug' => param('kernel.debug'),
6062
],
6163
abstract_arg('enabled locales'),
64+
service('translation.fallback_locale_provider')
6265
])
6366
->call('setConfigCacheFactory', [service('config_cache_factory')])
6467
->tag('kernel.locale_aware')
@@ -75,6 +78,9 @@
7578
->set('translator.formatter.default', MessageFormatter::class)
7679
->args([service('identity_translator')])
7780

81+
->set('translation.fallback_locale_provider', FallbackLocaleProvider::class)
82+
->alias(FallbackLocaleProviderInterface::class, 'translation.fallback_locale_provider')
83+
7884
->set('translation.loader.php', PhpFileLoader::class)
7985
->tag('translation.loader', ['alias' => 'php'])
8086

0 commit comments

Comments
 (0)
0