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