y 6d580e2b69 hooray_1 3 éve
..
Catalogue 6d580e2b69 hooray_1 3 éve
Command 6d580e2b69 hooray_1 3 éve
DataCollector 6d580e2b69 hooray_1 3 éve
DependencyInjection 6d580e2b69 hooray_1 3 éve
Dumper 6d580e2b69 hooray_1 3 éve
Exception 6d580e2b69 hooray_1 3 éve
Extractor 6d580e2b69 hooray_1 3 éve
Formatter 6d580e2b69 hooray_1 3 éve
Loader 6d580e2b69 hooray_1 3 éve
Reader 6d580e2b69 hooray_1 3 éve
Resources 6d580e2b69 hooray_1 3 éve
Util 6d580e2b69 hooray_1 3 éve
Writer 6d580e2b69 hooray_1 3 éve
CHANGELOG.md 6d580e2b69 hooray_1 3 éve
DataCollectorTranslator.php 6d580e2b69 hooray_1 3 éve
IdentityTranslator.php 6d580e2b69 hooray_1 3 éve
LICENSE 6d580e2b69 hooray_1 3 éve
LoggingTranslator.php 6d580e2b69 hooray_1 3 éve
MessageCatalogue.php 6d580e2b69 hooray_1 3 éve
MessageCatalogueInterface.php 6d580e2b69 hooray_1 3 éve
MetadataAwareInterface.php 6d580e2b69 hooray_1 3 éve
PseudoLocalizationTranslator.php 6d580e2b69 hooray_1 3 éve
README.md 6d580e2b69 hooray_1 3 éve
TranslatableMessage.php 6d580e2b69 hooray_1 3 éve
Translator.php 6d580e2b69 hooray_1 3 éve
TranslatorBagInterface.php 6d580e2b69 hooray_1 3 éve
composer.json 6d580e2b69 hooray_1 3 éve

README.md

Translation Component

The Translation component provides tools to internationalize your application.

Getting Started

$ composer require symfony/translation
use Symfony\Component\Translation\Translator;
use Symfony\Component\Translation\Loader\ArrayLoader;

$translator = new Translator('fr_FR');
$translator->addLoader('array', new ArrayLoader());
$translator->addResource('array', [
    'Hello World!' => 'Bonjour !',
], 'fr_FR');

echo $translator->trans('Hello World!'); // outputs « Bonjour ! »

Resources