kenan 0ab860990f falst há 1 ano atrás
..
Catalogue 0ab860990f falst há 1 ano atrás
Command 0ab860990f falst há 1 ano atrás
DataCollector 0ab860990f falst há 1 ano atrás
DependencyInjection 0ab860990f falst há 1 ano atrás
Dumper 0ab860990f falst há 1 ano atrás
Exception 0ab860990f falst há 1 ano atrás
Extractor 0ab860990f falst há 1 ano atrás
Formatter 0ab860990f falst há 1 ano atrás
Loader 0ab860990f falst há 1 ano atrás
Reader 0ab860990f falst há 1 ano atrás
Resources 0ab860990f falst há 1 ano atrás
Util 0ab860990f falst há 1 ano atrás
Writer 0ab860990f falst há 1 ano atrás
CHANGELOG.md 0ab860990f falst há 1 ano atrás
DataCollectorTranslator.php 0ab860990f falst há 1 ano atrás
IdentityTranslator.php 0ab860990f falst há 1 ano atrás
Interval.php 0ab860990f falst há 1 ano atrás
LICENSE 0ab860990f falst há 1 ano atrás
LoggingTranslator.php 0ab860990f falst há 1 ano atrás
MessageCatalogue.php 0ab860990f falst há 1 ano atrás
MessageCatalogueInterface.php 0ab860990f falst há 1 ano atrás
MessageSelector.php 0ab860990f falst há 1 ano atrás
MetadataAwareInterface.php 0ab860990f falst há 1 ano atrás
PluralizationRules.php 0ab860990f falst há 1 ano atrás
README.md 0ab860990f falst há 1 ano atrás
Translator.php 0ab860990f falst há 1 ano atrás
TranslatorBagInterface.php 0ab860990f falst há 1 ano atrás
TranslatorInterface.php 0ab860990f falst há 1 ano atrás
composer.json 0ab860990f falst há 1 ano atrás

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