You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
zenglingping 85f826c35f 111 3 years ago
..
Catalogue 111 3 years ago
Command 111 3 years ago
DataCollector 111 3 years ago
DependencyInjection 111 3 years ago
Dumper 111 3 years ago
Exception 111 3 years ago
Extractor 111 3 years ago
Formatter 111 3 years ago
Loader 111 3 years ago
Provider 111 3 years ago
Reader 111 3 years ago
Resources 111 3 years ago
Test 111 3 years ago
Util 111 3 years ago
Writer 111 3 years ago
CHANGELOG.md 111 3 years ago
DataCollectorTranslator.php 111 3 years ago
IdentityTranslator.php 111 3 years ago
LICENSE 111 3 years ago
LoggingTranslator.php 111 3 years ago
MessageCatalogue.php 111 3 years ago
MessageCatalogueInterface.php 111 3 years ago
MetadataAwareInterface.php 111 3 years ago
PseudoLocalizationTranslator.php 111 3 years ago
README.md 111 3 years ago
TranslatableMessage.php 111 3 years ago
Translator.php 111 3 years ago
TranslatorBag.php 111 3 years ago
TranslatorBagInterface.php 111 3 years ago
composer.json 111 3 years 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