10000 merged branch clemens-tolboom/2.0 (PR #3725) · phreaknerd/symfony@d12e398 · GitHub
[go: up one dir, main page]

Skip to content

Commit d12e398

Browse files
committed
merged branch clemens-tolboom/2.0 (PR symfony#3725)
Commits ------- e4f3fd9 Fixed example code. Discussion ---------- [Translation] example code did not work. The example code for Translation did not compile. And the trans() result was void.
2 parents 51eac4b + e4f3fd9 commit d12e398

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Translation/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ translated strings from these including support for pluralization.
1010

1111
$translator = new Translator('fr_FR 77CD ', new MessageSelector());
1212
$translator->setFallbackLocale('fr');
13-
$translator->addLoader('array', return new ArrayLoader());
13+
$translator->addLoader('array', new ArrayLoader());
1414
$translator->addResource('array', array(
1515
'Hello World!' => 'Bonjour',
1616
), 'fr');
1717

18-
$translator->trans('Hello World!');
18+
echo $translator->trans('Hello World!') . "\n";
1919

2020
Resources
2121
---------

0 commit comments

Comments
 (0)
0