Dmitriy Gnatenko 2c154caeca Vendors updated 3 years ago
..
Catalogue 2e430a556d Vendors updated 3 years ago
Command 2e430a556d Vendors updated 3 years ago
DataCollector e5f3fbd37b Vendors updated 3 years ago
DependencyInjection 0b8749ecf8 Update vendors 3 years ago
Dumper 2e430a556d Vendors updated 3 years ago
Exception da31d8a6df Revert "Vendors updated" 4 years ago
Extractor 2e430a556d Vendors updated 3 years ago
Formatter da31d8a6df Revert "Vendors updated" 4 years ago
Loader 2e430a556d Vendors updated 3 years ago
Reader da31d8a6df Revert "Vendors updated" 4 years ago
Resources 2e430a556d Vendors updated 3 years ago
Util 0b8749ecf8 Update vendors 3 years ago
Writer da31d8a6df Revert "Vendors updated" 4 years ago
CHANGELOG.md 9329362bd0 Symfony updated to 5.2 3 years ago
DataCollectorTranslator.php 0b8749ecf8 Update vendors 3 years ago
IdentityTranslator.php da31d8a6df Revert "Vendors updated" 4 years ago
LICENSE e5f3fbd37b Vendors updated 3 years ago
LoggingTranslator.php da31d8a6df Revert "Vendors updated" 4 years ago
MessageCatalogue.php 2c154caeca Vendors updated 3 years ago
MessageCatalogueInterface.php 0b8749ecf8 Update vendors 3 years ago
MetadataAwareInterface.php da31d8a6df Revert "Vendors updated" 4 years ago
PluralizationRules.php e5f3fbd37b Vendors updated 3 years ago
PseudoLocalizationTranslator.php 9329362bd0 Symfony updated to 5.2 3 years ago
README.md e5f3fbd37b Vendors updated 3 years ago
TranslatableMessage.php 9329362bd0 Symfony updated to 5.2 3 years ago
Translator.php 9329362bd0 Symfony updated to 5.2 3 years ago
TranslatorBagInterface.php da31d8a6df Revert "Vendors updated" 4 years ago
composer.json 2e430a556d Vendors updated 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