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

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