Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ba29d2a

Browse filesBrowse files
authored
Added $translator->addLoader()
For the example to work it needs the line with $translator->addLoader(). Fixed it for request at #39854 (comment)
1 parent 732bd84 commit ba29d2a
Copy full SHA for ba29d2a

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎src/Symfony/Component/Translation/README.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/README.md
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ $ composer require symfony/translation
1212

1313
```php
1414
use Symfony\Component\Translation\Translator;
15+
use Symfony\Component\Translation\Loader\ArrayLoader;
1516

1617
$translator = new Translator('fr_FR');
18+
$translator->addLoader('array', new ArrayLoader());
1719
$translator->addResource('array', [
1820
'Hello World!' => 'Bonjour !',
1921
], 'fr_FR');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.