ponepaste/vendor/symfony/translation
2021-08-27 06:46:27 -04:00
..
Catalogue So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
Command So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
DataCollector So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
DependencyInjection So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
Dumper So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
Exception So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
Extractor So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
Formatter So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
Loader So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
Provider So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
Reader So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
Resources So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
Test So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
Util So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
Writer So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
CHANGELOG.md So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
composer.json So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
DataCollectorTranslator.php So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
IdentityTranslator.php So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
LICENSE So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
LoggingTranslator.php So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
MessageCatalogue.php So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
MessageCatalogueInterface.php So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
MetadataAwareInterface.php So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
PseudoLocalizationTranslator.php So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
README.md So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
TranslatableMessage.php So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
Translator.php So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
TranslatorBag.php So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00
TranslatorBagInterface.php So much shit. Experimenting with Eloquent. 2021-08-27 06:46:27 -04:00

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