rkljw 2d74f709d7 news_producer 8 months ago
..
Catalogue 2d74f709d7 news_producer 8 months ago
Command 2d74f709d7 news_producer 8 months ago
DataCollector 2d74f709d7 news_producer 8 months ago
DependencyInjection 2d74f709d7 news_producer 8 months ago
Dumper 2d74f709d7 news_producer 8 months ago
Exception 2d74f709d7 news_producer 8 months ago
Extractor 2d74f709d7 news_producer 8 months ago
Formatter 2d74f709d7 news_producer 8 months ago
Loader 2d74f709d7 news_producer 8 months ago
Provider 2d74f709d7 news_producer 8 months ago
Reader 2d74f709d7 news_producer 8 months ago
Resources 2d74f709d7 news_producer 8 months ago
Test 2d74f709d7 news_producer 8 months ago
Util 2d74f709d7 news_producer 8 months ago
Writer 2d74f709d7 news_producer 8 months ago
CHANGELOG.md 2d74f709d7 news_producer 8 months ago
CatalogueMetadataAwareInterface.php 2d74f709d7 news_producer 8 months ago
DataCollectorTranslator.php 2d74f709d7 news_producer 8 months ago
IdentityTranslator.php 2d74f709d7 news_producer 8 months ago
LICENSE 2d74f709d7 news_producer 8 months ago
LocaleSwitcher.php 2d74f709d7 news_producer 8 months ago
LoggingTranslator.php 2d74f709d7 news_producer 8 months ago
MessageCatalogue.php 2d74f709d7 news_producer 8 months ago
MessageCatalogueInterface.php 2d74f709d7 news_producer 8 months ago
MetadataAwareInterface.php 2d74f709d7 news_producer 8 months ago
PseudoLocalizationTranslator.php 2d74f709d7 news_producer 8 months ago
README.md 2d74f709d7 news_producer 8 months ago
TranslatableMessage.php 2d74f709d7 news_producer 8 months ago
Translator.php 2d74f709d7 news_producer 8 months ago
TranslatorBag.php 2d74f709d7 news_producer 8 months ago
TranslatorBagInterface.php 2d74f709d7 news_producer 8 months ago
composer.json 2d74f709d7 news_producer 8 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 ! »

Sponsor

Help Symfony by sponsoring its development!

Resources