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

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