Skip to content

Commit 3bc26d7

Browse files
docs: Add instructions to use the cache directory
1 parent 31b40da commit 3bc26d7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,14 @@ $isoCodes = new IsoCodesFactory(null, new GettextExtensionDriver());
138138

139139
// symfony driver
140140
$driver = new SymfonyTranslationDriver();
141+
142+
// You can also specify a cache directory for better performance. If you are
143+
// using the SymfonyTranslationDriver within a Symfony project, you can inject
144+
// the `%kernel.cache_dir%/translations` value.
145+
$cacheDir = '...';
146+
147+
$driver = new SymfonyTranslationDriver($cacheDir)
148+
141149
$driver->setLocale('uk_UA');
142150

143151
$isoCodes = new IsoCodesFactory(

0 commit comments

Comments
 (0)