X\choro 48f1b97cc3 first commit il y a 1 an
..
Catalogue 48f1b97cc3 first commit il y a 1 an
Command 48f1b97cc3 first commit il y a 1 an
DataCollector 48f1b97cc3 first commit il y a 1 an
DependencyInjection 48f1b97cc3 first commit il y a 1 an
Dumper 48f1b97cc3 first commit il y a 1 an
Exception 48f1b97cc3 first commit il y a 1 an
Extractor 48f1b97cc3 first commit il y a 1 an
Formatter 48f1b97cc3 first commit il y a 1 an
Loader 48f1b97cc3 first commit il y a 1 an
Provider 48f1b97cc3 first commit il y a 1 an
Reader 48f1b97cc3 first commit il y a 1 an
Resources 48f1b97cc3 first commit il y a 1 an
Test 48f1b97cc3 first commit il y a 1 an
Util 48f1b97cc3 first commit il y a 1 an
Writer 48f1b97cc3 first commit il y a 1 an
CHANGELOG.md 48f1b97cc3 first commit il y a 1 an
CatalogueMetadataAwareInterface.php 48f1b97cc3 first commit il y a 1 an
DataCollectorTranslator.php 48f1b97cc3 first commit il y a 1 an
IdentityTranslator.php 48f1b97cc3 first commit il y a 1 an
LICENSE 48f1b97cc3 first commit il y a 1 an
LocaleSwitcher.php 48f1b97cc3 first commit il y a 1 an
LoggingTranslator.php 48f1b97cc3 first commit il y a 1 an
MessageCatalogue.php 48f1b97cc3 first commit il y a 1 an
MessageCatalogueInterface.php 48f1b97cc3 first commit il y a 1 an
MetadataAwareInterface.php 48f1b97cc3 first commit il y a 1 an
PseudoLocalizationTranslator.php 48f1b97cc3 first commit il y a 1 an
README.md 48f1b97cc3 first commit il y a 1 an
TranslatableMessage.php 48f1b97cc3 first commit il y a 1 an
Translator.php 48f1b97cc3 first commit il y a 1 an
TranslatorBag.php 48f1b97cc3 first commit il y a 1 an
TranslatorBagInterface.php 48f1b97cc3 first commit il y a 1 an
composer.json 48f1b97cc3 first commit il y a 1 an

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 ! »

Sponsor

Help Symfony by sponsoring its development!

Resources