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

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