Fixed example code.
This commit is contained in:
parent
51eac4b5fc
commit
e4f3fd9a72
@ -10,12 +10,12 @@ translated strings from these including support for pluralization.
|
||||
|
||||
$translator = new Translator('fr_FR', new MessageSelector());
|
||||
$translator->setFallbackLocale('fr');
|
||||
$translator->addLoader('array', return new ArrayLoader());
|
||||
$translator->addLoader('array', new ArrayLoader());
|
||||
$translator->addResource('array', array(
|
||||
'Hello World!' => 'Bonjour',
|
||||
), 'fr');
|
||||
|
||||
$translator->trans('Hello World!');
|
||||
echo $translator->trans('Hello World!') . "\n";
|
||||
|
||||
Resources
|
||||
---------
|
||||
|
Reference in New Issue
Block a user