ss 394472f036 init 5 months ago
..
Catalogue 394472f036 init 5 months ago
Command 394472f036 init 5 months ago
DataCollector 394472f036 init 5 months ago
DependencyInjection 394472f036 init 5 months ago
Dumper 394472f036 init 5 months ago
Exception 394472f036 init 5 months ago
Extractor 394472f036 init 5 months ago
Formatter 394472f036 init 5 months ago
Loader 394472f036 init 5 months ago
Reader 394472f036 init 5 months ago
Resources 394472f036 init 5 months ago
Util 394472f036 init 5 months ago
Writer 394472f036 init 5 months ago
CHANGELOG.md 394472f036 init 5 months ago
DataCollectorTranslator.php 394472f036 init 5 months ago
IdentityTranslator.php 394472f036 init 5 months ago
Interval.php 394472f036 init 5 months ago
LICENSE 394472f036 init 5 months ago
LoggingTranslator.php 394472f036 init 5 months ago
MessageCatalogue.php 394472f036 init 5 months ago
MessageCatalogueInterface.php 394472f036 init 5 months ago
MessageSelector.php 394472f036 init 5 months ago
MetadataAwareInterface.php 394472f036 init 5 months ago
PluralizationRules.php 394472f036 init 5 months ago
README.md 394472f036 init 5 months ago
Translator.php 394472f036 init 5 months ago
TranslatorBagInterface.php 394472f036 init 5 months ago
TranslatorInterface.php 394472f036 init 5 months ago
composer.json 394472f036 init 5 months ago

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